Mode was a bit more complicated than class reductions, so we retreat back to ApplyConcatApply
| 1277 | |
| 1278 | |
| 1279 | class 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 | |
| 1304 | class NuniqueApprox(Reduction): |
no outgoing calls
no test coverage detected
searching dependent graphs…