You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we run the above code, we see that the datatype of 'date' column is object, but when compared with date type using != it returns False in place of True. But the same comparison done using "is not" returns True! Please note that that this was working in earlier versions e.g. in pandas 1.x
Expected Behavior
When comparing dtype object with date using != should have returned True.
Installed Versions
INSTALLED VERSIONS
commit : a60ad39
python : 3.9.17.final.0
python-bits : 64
OS : Darwin
OS-release : 21.6.0
Version : Darwin Kernel Version 21.6.0: Wed Oct 4 23:55:28 PDT 2023; root:xnu-8020.240.18.704.15~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
Thanks for the report, but since this is an upstream issue closing here. Feel free to raise an issue in numpy if you believe the behavior should change
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
When we run the above code, we see that the datatype of 'date' column is object, but when compared with date type using != it returns False in place of True. But the same comparison done using "is not" returns True! Please note that that this was working in earlier versions e.g. in pandas 1.x
Expected Behavior
When comparing dtype object with date using != should have returned True.
Installed Versions
INSTALLED VERSIONS
commit : a60ad39
python : 3.9.17.final.0
python-bits : 64
OS : Darwin
OS-release : 21.6.0
Version : Darwin Kernel Version 21.6.0: Wed Oct 4 23:55:28 PDT 2023; root:xnu-8020.240.18.704.15~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.1.2
numpy : 1.24.2
pytz : 2022.7.1
dateutil : 2.8.2
setuptools : 67.8.0
pip : 23.3.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.2
html5lib : 1.1
pymysql : None
psycopg2 : 2.9.9
jinja2 : 3.1.2
IPython : 7.28.0
pandas_datareader : 0.10.0
bs4 : 4.12.2
bottleneck : None
dataframe-api-compat: None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.6.1
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 3.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.9.2
sqlalchemy : 2.0.15
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
None
The text was updated successfully, but these errors were encountered: