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

Class BlockwiseTail

dask/dataframe/dask_expr/_expr.py:2714–2727  ·  view source on GitHub ↗

Take the last `n` rows of every partition Typically used after `Partitions(..., [-1])` to take the last `n` rows of an entire collection.

Source from the content-addressed store, hash-verified

2712
2713
2714class BlockwiseTail(Tail, Blockwise):
2715 """Take the last `n` rows of every partition
2716
2717 Typically used after `Partitions(..., [-1])` to take
2718 the last `n` rows of an entire collection.
2719 """
2720
2721 _preserves_partitioning_information = True
2722
2723 def _divisions(self):
2724 return self.frame.divisions
2725
2726 def _task(self, name: Key, index: int) -> Task:
2727 return Task(name, M.tail, TaskRef((self.frame._name, index)), self.n)
2728
2729
2730class BlockwiseTailIndex(BlockwiseTail):

Callers 1

_lowerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected