xarray.DataArray.to_dict
xarray.DataArray.to_dict¶
-
DataArray.
to_dict
(data=True)[source]¶ Convert this xarray.DataArray into a dictionary following xarray naming conventions.
Converts all variables and attributes to native Python objects. Useful for converting to json. To avoid datetime incompatibility use decode_times=False kwarg in xarray.open_dataset.
- Parameters
data (
bool
, optional) – Whether to include the actual data in the dictionary. When set to False, returns just the schema.
See also