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
DataFrame._data
deprecation in pandas
#10081
DataFrame._data
deprecation in pandas
#10081
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @j-bennet! I pushed a small commit to just use ._mgr
unconditionally since that appears to exist for all supported pandas
versions (including dev pandas
).
@phofl the deprecation warning says to use a public API instead of ._data
. ._mgr
works, but is still private. Is there a public API you'd recommend? Alternatively, is there a different approach we could take in this function? This function is meant to produce a unique, deterministic hash for a given pd.DataFrame
pandas
DataFrame._data
deprecation in pandas
You could iterate over all columns of the DataFrame to collect the arrays, but this is obviously slower then accessing them directly. So not really a good idea if performance is relevant here. I guess |
Sounds good 👍
Ah, good point. If there was a utility in |
xref #10083 |
Fixes test failure in upstream:
Xref pandas-dev/pandas#52003.
pre-commit run --all-files