-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUG: read multi-index column csv with index_col=False borks #6051
Comments
For convenience, here's test case:
seems to skip first row after header. Note: columns tuplized as wanted to see if this was also a bug in 0.12. |
@hayd could try |
Mine is skipping all the subsequent rows (
|
@jreback maybe was just being thick about tuplize columns (forgot repr of mi) is working fine, OT though. There is a change in 0.12 and 0.13. I see what @TomAugspurger sees in 0.13. |
The problem is that it is confused by the lack of an |
Seems like the column after the header is being used for the naming of the index?
|
@hayd yes if it can, but this is where the index_col matters, it is a heuristic (and maybe wrong in this case) |
Seems the problem is caused by the duplicated columns ( Female, R). If you modify the second row to |
@waitingkuo hmm a duplicated multi index is technically valid (prob not tested very well though) want to dig in? |
For duplicated single column, some sequence numbers would be append:
According to this logic, the multi-column one
should be converted to
Does it make sense? |
That looks correct. However there is also a flag for this,
|
Well... er that's a bug! |
Things also go wrong when we set header as a list
|
I've figured out the problem and fixed it in python2. However, I got stuck in python3. Can anyone who have experience in python3 give me a hand? My commit My Travis Failed build |
use lzip instead of zip |
Thank you for helping :) |
are there tests covering this case? if not can u put one up |
@jreback Okay. I'll check. |
cc @gfyoung |
http://stackoverflow.com/questions/21318865/read-multi-index-on-the-columns-from-csv-file
The text was updated successfully, but these errors were encountered: