Dask dataframe view#
Backs NetCDF.to_dask_dataframe(). Builds a tidy dask.dataframe.DataFrame — dimension
coordinates as columns beside the value columns, on a flat index — reading values lazily.
| Backend method | to_dask_dataframe |
| Module | pyramids_lazy._to_dask_dataframe |
| Returns | dask.dataframe.DataFrame |
from pyramids.netcdf import NetCDF
cube = NetCDF.read_file("era5.nc")
df = cube.to_dask_dataframe(variables=["t2m"], dropna=True, chunks="auto")
df.groupby("time").t2m.mean().compute()
Relocated from core's Interop engine — this is the lazy half of it; the eager
to_dataframe stays in core.
API#
pyramids_lazy._to_dask_dataframe.to_dask_dataframe(nc, *, variables=None, dropna=False, chunks='auto')
#
Hand nc's cube to dask in tidy form — the lazy sibling of to_dataframe.
Returns a :class:dask.dataframe.DataFrame with the dimension coordinates as plain columns
beside the value columns on a flat index. Values are read lazily through NetCDF.read_array.