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

Class Count

dask/dataframe/dask_expr/_reductions.py:1256–1270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1254
1255
1256class Count(Reduction):
1257 _parameters = ["frame", "numeric_only", "split_every"]
1258 _defaults = {"split_every": False, "numeric_only": False}
1259 reduction_chunk = M.count
1260
1261 @classmethod
1262 def reduction_aggregate(cls, df):
1263 return df.sum().astype("int64")
1264
1265 @property
1266 def chunk_kwargs(self):
1267 if self.frame._meta.ndim < 2:
1268 return dict()
1269 else:
1270 return dict(numeric_only=self.numeric_only)
1271
1272
1273class IndexCount(Reduction):

Callers 1

countMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected