BUG: NaT value comparation always result in True within DataFrame but not Series #18816
Labels
Datetime
Datetime data dtype
Duplicate Report
Duplicate issue or pull request
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Code Sample, a copy-pastable example
Problem description
When comparing a dataframe of dtype Timestamp to a scalar value (Timestamp or datetime), the result to NaT is always True no matter what operator is used(==, <, >, ...).
But it is not the case when compares a series of Timestamps.
Expected Output
Output of
pd.show_versions()
pandas: 0.21.1
pytest: 3.0.5
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.13.3
scipy: 0.18.1
pyarrow: None
xarray: 0.9.6
IPython: 6.1.0
sphinx: 1.5.1
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.0
tables: 3.4.2
numexpr: 2.6.1
feather: None
matplotlib: 2.1.0
openpyxl: 2.4.1
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.7.2
bs4: 4.5.3
html5lib: None
sqlalchemy: 1.1.5
pymysql: None
psycopg2: None
jinja2: 2.9.4
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 0.5.0
The text was updated successfully, but these errors were encountered: