MCPcopy Index your code
hub / github.com/dask/dask / Mode

Class Mode

dask/dataframe/dask_expr/_reductions.py:1279–1301  ·  view source on GitHub ↗

Mode was a bit more complicated than class reductions, so we retreat back to ApplyConcatApply

Source from the content-addressed store, hash-verified

1277
1278
1279class Mode(Reduction):
1280 """
1281
1282 Mode was a bit more complicated than class reductions, so we retreat back
1283 to ApplyConcatApply
1284 """
1285
1286 _parameters = ["frame", "dropna", "split_every"]
1287 _defaults = {"dropna": True, "split_every": False}
1288 reduction_chunk = M.value_counts
1289 reduction_combine = M.sum
1290 reduction_aggregate = staticmethod(_mode_aggregate)
1291
1292 def _divisions(self):
1293 return self.frame.divisions[0], self.frame.divisions[-1]
1294
1295 @property
1296 def chunk_kwargs(self):
1297 return {"dropna": self.dropna}
1298
1299 @property
1300 def aggregate_kwargs(self):
1301 return {"dropna": self.dropna}
1302
1303
1304class NuniqueApprox(Reduction):

Callers 1

modeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…