MCPcopy
hub / github.com/dask/dask / idxmaxmin_chunk

Function idxmaxmin_chunk

dask/dataframe/core.py:317–327  ·  view source on GitHub ↗
(x, fn=None, skipna=True, numeric_only=False)

Source from the content-addressed store, hash-verified

315
316
317def idxmaxmin_chunk(x, fn=None, skipna=True, numeric_only=False):
318 numeric_only_kwargs = {} if is_series_like(x) else {"numeric_only": numeric_only}
319 minmax = "max" if fn == "idxmax" else "min"
320 if len(x) > 0:
321 idx = getattr(x, fn)(skipna=skipna, **numeric_only_kwargs)
322 value = getattr(x, minmax)(skipna=skipna, **numeric_only_kwargs)
323 else:
324 idx = value = meta_series_constructor(x)([], dtype="i8")
325 if is_series_like(idx):
326 return meta_frame_constructor(x)({"idx": idx, "value": value})
327 return meta_frame_constructor(x)({"idx": [idx], "value": [value]})
328
329
330def idxmaxmin_row(x, fn=None, skipna=True):

Callers

nothing calls this directly

Calls 3

is_series_likeFunction · 0.90
meta_series_constructorFunction · 0.90
meta_frame_constructorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…