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

ENH: Allow read_csv dtype to accept category #10551

Closed
sinhrks opened this issue Jul 11, 2015 · 1 comment
Closed

ENH: Allow read_csv dtype to accept category #10551

sinhrks opened this issue Jul 11, 2015 · 1 comment
Labels
API Design IO CSV read_csv, to_csv IO Data IO issues that don't fit into a more specific label

Comments

@sinhrks
Copy link
Member

sinhrks commented Jul 11, 2015

Like R's stringsAsFactors, it is nice to create category when read data. Currently, it raises TypeError.

import pandas as pd
import StringIO
pd.read_csv(StringIO.StringIO("""A, B
a, c
b, d"""), dtype={'A': 'category'})
# TypeError: data type "category" not understood
@sinhrks sinhrks added IO Data IO issues that don't fit into a more specific label API Design IO CSV read_csv, to_csv labels Jul 11, 2015
@sinhrks
Copy link
Member Author

sinhrks commented Jul 11, 2015

Ah, dupe of #10153.

@sinhrks sinhrks closed this as completed Jul 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design IO CSV read_csv, to_csv IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

No branches or pull requests

1 participant