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

Class NuniqueApprox

dask/dataframe/dask_expr/_reductions.py:1306–1327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

nunique_approxMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected