-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ERR: Raise ValueError when non-default index is given for orc format #51828
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
Conversation
pandas/io/orc.py
Outdated
# validate that we have only a default index | ||
# raise on anything else as we don't serialize the index | ||
|
||
if not df.index.equals(RangeIndex.from_range(range(len(df)))): |
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.
Might be clearer to use pandas.core.indexes.api.default_index
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.
Updated
Just confirming, they are dropped without a warning/exception from pyarrow? |
Yes they are just gone when roundtripping |
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.
Merge conflict too otherwise looks good
Co-authored-by: Matthew Roeschke <[email protected]>
# Conflicts: # pandas/io/orc.py
Thanks @phofl |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.orc can't handle indexes right now (they are dropped), so we should raise like we did in feather