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

Method get_partition

dask/dataframe/dask_expr/_collection.py:815–836  ·  view source on GitHub ↗

Get a dask DataFrame/Series representing the `nth` partition. Parameters ---------- n : int The 0-indexed partition number to select. Returns ------- Dask DataFrame or Series The same type as the original object.

(self, n)

Source from the content-addressed store, hash-verified

813 return IndexCallable(self._partitions)
814
815 def get_partition(self, n):
816 """
817 Get a dask DataFrame/Series representing the `nth` partition.
818
819 Parameters
820 ----------
821 n : int
822 The 0-indexed partition number to select.
823
824 Returns
825 -------
826 Dask DataFrame or Series
827 The same type as the original object.
828
829 See Also
830 --------
831 DataFrame.partitions
832 """
833 if not 0 <= n < self.npartitions:
834 msg = f"n must be 0 <= n < {self.npartitions}"
835 raise ValueError(msg)
836 return self.partitions[n]
837
838 def shuffle(
839 self,

Callers 15

iterrowsMethod · 0.80
itertuplesMethod · 0.80
__iter__Method · 0.80
test_empty_partitionsFunction · 0.80
test_get_partitionFunction · 0.80
test_no_overlapsFunction · 0.80
test_needs_rationalFunction · 0.80
test_empty_partitionsFunction · 0.80

Calls

no outgoing calls

Tested by 12

test_empty_partitionsFunction · 0.64
test_get_partitionFunction · 0.64
test_no_overlapsFunction · 0.64
test_needs_rationalFunction · 0.64
test_empty_partitionsFunction · 0.64
test_get_partitionFunction · 0.64
test_partitions_indexerFunction · 0.64