Skip to content

writing tables with categorical columns #25

Description

@bridwell

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions