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

Class Count

dask/dataframe/dask_expr/_reductions.py:1254–1268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

countMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected