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

writing tables with categorical columns #25

Open
bridwell opened this issue Apr 27, 2017 · 0 comments
Open

writing tables with categorical columns #25

bridwell opened this issue Apr 27, 2017 · 0 comments

Comments

@bridwell
Copy link
Contributor

When trying to write a dataframe with categorical columns to a HDF store, I get the following error:

Cannot store a category dtype in a HDF5 dataset that uses format="fixed". Use format="table"

This is resolved when writing out using table as the output format instead of fixed. So my question is: should the output format be another option on the run method, or should categoricals be converted back to strings and then output using the fixed format?

As an aside, the output will also fail, even with table as the output format, if the categorical was built from a column with unicode strings. Calling column = column.astype(str) before creating the categorical seems to take care of this.

Or should we just avoid categoricals all together?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant