Skip to content
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

DeepHash: Different dataframes get the same hash #394

Open
amakelov opened this issue Apr 29, 2023 · 1 comment
Open

DeepHash: Different dataframes get the same hash #394

amakelov opened this issue Apr 29, 2023 · 1 comment
Assignees
Labels

Comments

@amakelov
Copy link

Describe the bug
Hash collision seems to happen whenever two dataframes have the same column names, regardless of the rows.

To Reproduce

from deepdiff import DeepHash
x = pd.DataFrame({'a': [1, 2, 3]})
y = pd.DataFrame({'a': [1, 2, 3, 4]})
a = DeepHash(x)[x]
b = DeepHash(y)[y]
assert a == b

Expected behavior
Collisions should be harder to find than this (unless this was designed into the library?)

OS, DeepDiff version and Python version (please complete the following information):

  • OS: Ubuntu 22.04.2 LTS
  • Python Version: 3.10.8
  • DeepDiff Version: 6.3.0
@seperman seperman self-assigned this May 1, 2023
@seperman seperman added the bug label May 1, 2023
@seperman
Copy link
Owner

seperman commented May 1, 2023

Hi @amakelov
While we have been supporting Numpy for many years, Pandas data-frames have never been covered. If you have time to add the Pandas support to DeepDiff, that would be great. Otherwise I will look into it when I have a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants