Skip to content

BUG: Fix multi-index colname references in read_csv c engine. #42519

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

Merged
merged 2 commits into from
Jul 15, 2021

Conversation

jmcomie
Copy link
Contributor

@jmcomie jmcomie commented Jul 13, 2021

This fixes an issue with the read_csv c engine when the input has more than one header row and arguments to dtype, na_values, or converters reference multi-index column names as tuples.

I added a whatsnew entry for v1.4.0 since that's what other recent bug fixes have done, but I'm not yet sure of the criteria for that. Is it appropriate to add it for whichever release "owns" master?

This fixes an issue with the read_csv c engine when the input has more
than one header row and arguments to dtype, na_values, or converters
reference multi-index column names as tuples.
@jreback jreback added Bug IO CSV read_csv, to_csv MultiIndex labels Jul 13, 2021
@jreback jreback added this to the 1.4 milestone Jul 13, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

looks fine, some comments

@jreback
Copy link
Contributor

jreback commented Jul 13, 2021

cc @gfyoung if you'd have a look

@jmcomie jmcomie requested a review from jreback July 14, 2021 18:52
@jmcomie
Copy link
Contributor Author

jmcomie commented Jul 15, 2021

Regarding the failed check -- I've run the test tests/scalar/timedelta/test_arithmetic.py and it's passing locally. If it's an issue in my branch I will work to fix it but it seems this might be an environmental error ?

@jreback jreback merged commit 2ec9862 into pandas-dev:master Jul 15, 2021
@jreback
Copy link
Contributor

jreback commented Jul 15, 2021

thanks @jmcomie

failed check is not related

feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

option dtype in pandas.read_csv does not work properly for mulilevel columns
3 participants