MCPcopy
hub / github.com/dask/dask / _mode_aggregate

Function _mode_aggregate

dask/dataframe/core.py:368–377  ·  view source on GitHub ↗
(df, dropna)

Source from the content-addressed store, hash-verified

366
367
368def _mode_aggregate(df, dropna):
369 value_count_series = df.sum()
370 max_val = value_count_series.max(skipna=dropna)
371 mode_series = (
372 value_count_series[value_count_series == max_val]
373 .index.to_series()
374 .sort_values()
375 .reset_index(drop=True)
376 )
377 return mode_series
378
379
380def safe_head(df, n):

Callers

nothing calls this directly

Calls 5

reset_indexMethod · 0.80
sort_valuesMethod · 0.80
sumMethod · 0.45
maxMethod · 0.45
to_seriesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…