Skip to content
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

read_csv fails when both converts and index_col are used on the same column #1835

Closed
lodagro opened this issue Sep 3, 2012 · 1 comment
Closed
Labels
Bug IO Data IO issues that don't fit into a more specific label
Milestone

Comments

@lodagro
Copy link
Contributor

lodagro commented Sep 3, 2012

In [473]: d = """\
A;B
1;2
3;4
"""

In [474]: pandas.read_csv(StringIO(d), sep=';', converters={'A': lambda x: x}, index_col='A')
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-474-6bc08702ea91> in <module>()
...
KeyError: 'A'

In [475]: pandas.read_csv(StringIO(d), sep=';', converters={'A': lambda x: x}).set_index('A')
Out[475]: 
   B
A   
1  2
3  4
@ghost ghost assigned changhiskhan Sep 3, 2012
wesm added a commit that referenced this issue Sep 10, 2012
* chang/conv-index-col:
  BUG: fixed empty case #1835
  BUG: converters and index_col on same column #1835. Also minor refactor of parsers
@wesm
Copy link
Member

wesm commented Sep 10, 2012

fixed by #1875

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

No branches or pull requests

3 participants