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

Class BlockwiseTail

dask/dataframe/dask_expr/_expr.py:2691–2704  ·  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

2689
2690
2691class BlockwiseTail(Tail, Blockwise):
2692 """Take the last `n` rows of every partition
2693
2694 Typically used after `Partitions(..., [-1])` to take
2695 the last `n` rows of an entire collection.
2696 """
2697
2698 _preserves_partitioning_information = True
2699
2700 def _divisions(self):
2701 return self.frame.divisions
2702
2703 def _task(self, name: Key, index: int) -> Task:
2704 return Task(name, M.tail, TaskRef((self.frame._name, index)), self.n)
2705
2706
2707class BlockwiseTailIndex(BlockwiseTail):

Callers 1

_lowerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected