Skip to content

ARROW-1754: [Python] Fix buggy Parquet roundtrip when an index name is the same as a column name #1271

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

Closed
wants to merge 1 commit into from

Conversation

cpcloud
Copy link
Contributor

@cpcloud cpcloud commented Oct 30, 2017

No description provided.

Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wesm wesm closed this in 0880550 Oct 31, 2017
@wesm
Copy link
Member

wesm commented Oct 31, 2017

thanks @cpcloud!

@cpcloud cpcloud deleted the ARROW-1754 branch October 31, 2017 17:24
@pjdufour
Copy link

Yes!

wesm pushed a commit that referenced this pull request Feb 2, 2018
…that preserves index name if available

Related to the discussion about the pandas metadata specification in pandas-dev/pandas#18201, and an alternative to #1271.

I don't open this PR because it should necessarily be merged, I just want to show that it is not that difficult to both fix [ARROW-1754](https://issues.apache.org/jira/browse/ARROW-1754) and preserve index names as field names when possible (as this was mentioned in pandas-dev/pandas#18201 as the reason to make this change to not preserve index names).
The diff is partly a revert of #1271, but then adapted to the current codebase.

Main reasons I prefer to preserve index names: 1) usability in pyarrow itself (if you would want to work with pyarrow Tables created from pandas) and 2) when interchanging parquet files with other people / other non-pandas systems, then it would be much nicer to not have `__index_level_n__` column names if possible.

Author: Joris Van den Bossche <jorisvandenbossche@gmail.com>

Closes #1408 from jorisvandenbossche/index-names and squashes the following commits:

eef1d33 [Joris Van den Bossche] alternative fix for duplicate index/column name that preserves index name if available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants