Skip to content

ERR: raise when index_col=True is passed #9835

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 1 commit into from
Apr 9, 2015

Conversation

yanxiaole
Copy link

closes #9798

Add a check to see whether the index_col is True.

@@ -905,7 +905,7 @@ def _make_index(self, data, alldata, columns, indexnamerow=False):

def _get_simple_index(self, data, columns):
def ix(col):
if not isinstance(col, compat.string_types):
if not (isinstance(col, compat.string_types) or col is True):
Copy link
Contributor

Choose a reason for hiding this comment

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

move this to TextFileReader in the _clean_options (or __init__)

@jreback jreback changed the title BUG: Issue 9798 fixed ERR: raise when index_col=True is passed Apr 8, 2015
@jreback jreback added the IO CSV read_csv, to_csv label Apr 8, 2015
@jreback jreback added this to the 0.16.1 milestone Apr 8, 2015
@jreback jreback added the Error Reporting Incorrect or improved errors from pandas label Apr 8, 2015
@yanxiaole
Copy link
Author

I moved it to TextFileReader in the _clean_options

@jreback
Copy link
Contributor

jreback commented Apr 8, 2015

ok, pls squash, then looks good to go. ping me when green.

BUG: pandas-dev#9798 `index_col` shouldn't accept the value `True`

move the check to ``TextFileReader`` ``clean_options``
@yanxiaole
Copy link
Author

hi @jreback , I've squashed the commits, and it's green now. could u take a look on it?

jreback added a commit that referenced this pull request Apr 9, 2015
ERR: raise when index_col=True is passed
@jreback jreback merged commit 0bd880a into pandas-dev:master Apr 9, 2015
@jreback
Copy link
Contributor

jreback commented Apr 9, 2015

@bottleimp thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read_csv() interprets index_col="True" as "1"
2 participants