-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ERR: dont' allow ambiguous usecols #12678
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
Comments
@jreback : I'll tackle this one as a follow-up in terms of fixing documentation and enforcement. In the meantime, I'll remove the tests I added that had the ambiguous columns. |
Shouldn't we also just raise on duplicates in |
@jorisvandenbossche : |
what we could do is:
|
This is on master.
but I think that these should BOTH output
IOW, the Then names takes over and you get the 0th and 2nd columns (that are named 'a') |
cc @sxwang |
Okay, but in terms of allocation, that issue should be tackled there, and I could just handle the enforcing non-ambiguous |
@gfyoung yes, that's right! |
yep that sounds right. let's restrict this issue to ambiguous errors |
Enforces the fact that 'usecols' must either be all integers (indexing) or strings (column names), as mixtures of the two are ambiguous. Closes pandas-devgh-12678.
#12551 and comment: #12512 (comment)
usecols=['a',1]
should raiseThe text was updated successfully, but these errors were encountered: