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

Function _value_counts

dask/dataframe/groupby.py:1210–1216  ·  view source on GitHub ↗
(x, **kwargs)

Source from the content-addressed store, hash-verified

1208
1209
1210def _value_counts(x, **kwargs):
1211 if not x.groups or all(
1212 pd.isna(key) for key in flatten(x.groups.keys(), container=tuple)
1213 ):
1214 return pd.Series(dtype=int)
1215 else:
1216 return x.value_counts(**kwargs)
1217
1218
1219def _value_counts_aggregate(series_gb):

Callers

nothing calls this directly

Calls 5

flattenFunction · 0.90
allFunction · 0.85
isnaMethod · 0.45
keysMethod · 0.45
value_countsMethod · 0.45

Tested by

no test coverage detected