-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: hash_pandas_object hash differs for NaN #28363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Do you know what guarantee NumPy makes about |
That is curious. Is the |
I think so. That gives you an |
Probably related to #16632 |
Here's an observation/fix. Replacing x3 = pd.Series(x2).replace(np.nan, np.nan)
hashed_x3 = hash_pandas_object(x3)
assert expected[0] == hashed_x3.values[0] # passes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Code Sample, a copy-pastable example if possible
Problem description
For the array x2 the nan value results in a different hash what is not expected.
Expected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 3.7.4.final.0
python-bits: 64
OS: Linux
OS-release: 5.2.8-1-MANJARO
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: de_DE.UTF-8
LOCALE: de_DE.UTF-8
pandas: 0.24.2
pytest: 5.0.1
pip: 19.0.3
setuptools: 41.0.1
Cython: 0.29.13
numpy: 1.17.0
scipy: 1.3.0
pyarrow: None
xarray: None
IPython: 7.6.1
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.1.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
The text was updated successfully, but these errors were encountered: