-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Current versions of (pandas/xarray?) are now causing a failure in xarray.Dataset.to_netcdf
with the datasets generated by viresclient where "Spacecraft" is stored as a pandas.Categorical
, where this didn't happen before.
ds["Spacecraft"] = ( |
For example:
import pandas as pd
import xarray as xr
ds = xr.Dataset(
data_vars={
"x": ("t", pd.Categorical(["A", "B", "B", "A"], categories=["A", "B"]))
}
)
ds.to_netcdf("test.h5")
fails with:
TypeError: Cannot interpret 'CategoricalDtype(categories=['A', 'B'], ordered=False, categories_dtype=object)' as a data type
Metadata
Metadata
Assignees
Labels
No labels