Skip to content

to_hdf is broken with MultiIndex #256

@dhalpern

Description

@dhalpern

to_hdf appears to be broken since the 3.0 update. I believe this is because this line reindexes when there is a MultiIndex. However, each sub-index in a multi-index returns true for the is instance line meaning that the reset index gets called multiple times.

self = self.reset_index(idx)

Not sure about an immediate solution but one option could be cfxarray (https://cf-xarray.readthedocs.io/en/latest/coding.html) which is suggested by Xarray when trying to save netcdfs with multi-index

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions