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

Class NuniqueApprox

dask/dataframe/dask_expr/_reductions.py:1304–1325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1302
1303
1304class NuniqueApprox(Reduction):
1305 _parameters = ["frame", "b", "split_every"]
1306 _defaults = {"b": 16, "split_every": None}
1307 reduction_chunk = hyperloglog.compute_hll_array
1308 reduction_combine = hyperloglog.reduce_state
1309 reduction_aggregate = hyperloglog.estimate_count
1310
1311 @functools.cached_property
1312 def _meta(self):
1313 return 1.0
1314
1315 @property
1316 def chunk_kwargs(self):
1317 return {"b": self.b}
1318
1319 @property
1320 def combine_kwargs(self):
1321 return self.chunk_kwargs
1322
1323 @property
1324 def aggregate_kwargs(self):
1325 return self.chunk_kwargs
1326
1327
1328class ReductionConstantDim(Reduction):

Callers 1

nunique_approxMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected