MCPcopy Create free account
hub / github.com/dask/dask / chunk

Method chunk

dask/dataframe/dask_expr/_groupby.py:840–844  ·  view source on GitHub ↗
(df, *by, **kwargs)

Source from the content-addressed store, hash-verified

838
839 @staticmethod
840 def chunk(df, *by, **kwargs):
841 if df.ndim == 1:
842 df = df.to_frame()
843 kwargs = dict(name=df.columns[0], levels=_determine_levels(by))
844 return _nunique_df_chunk(df, *by, **kwargs)
845
846 @functools.cached_property
847 def chunk_kwargs(self) -> dict: # type: ignore[override]

Callers 4

_meta_chunkMethod · 0.45
_meta_chunkMethod · 0.45
test_xarray_8414Function · 0.45
test_slicingFunction · 0.45

Calls 3

_determine_levelsFunction · 0.90
_nunique_df_chunkFunction · 0.90
to_frameMethod · 0.45

Tested by 2

test_xarray_8414Function · 0.36
test_slicingFunction · 0.36