-
Notifications
You must be signed in to change notification settings - Fork 426
Description
This is a feature request: add support for xarray (https://xarray.pydata.org).
xarray is a package strongly inspired by pandas that adds multi-dimensional arrays (among other things). Once a dimension or time is selected, data can be converted to dataframe directly for dtale display (https://xarray.pydata.org/en/stable/generated/xarray.DataArray.to_dataframe.html)
Recently xarray added the possibility to preview the metadata (dimensions and coordinates) in jupyter:
The idea could be to try something similar, and by selecting a certain dimension or time, display the data in dtale.
I know this might not be a trivial request, so I'm offering to help implement it. However, I think it's worth thinking about because xarray is a package that is becoming very popular in the scientific community.
A first approach might be:
If you want to show all the dimensions at one point in time:
data.sel(time="selected_time").to_dataframe()
If you want to show all your time data from a particular dimension:
data["dimension_name"].to_dataframe()