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

Method get_partition

dask/dataframe/dask_expr/_collection.py:855–876  ·  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

853 return IndexCallable(self._partitions)
854
855 def get_partition(self, n):
856 """
857 Get a dask DataFrame/Series representing the `nth` partition.
858
859 Parameters
860 ----------
861 n : int
862 The 0-indexed partition number to select.
863
864 Returns
865 -------
866 Dask DataFrame or Series
867 The same type as the original object.
868
869 See Also
870 --------
871 DataFrame.partitions
872 """
873 if not 0 <= n < self.npartitions:
874 msg = f"n must be 0 <= n < {self.npartitions}"
875 raise ValueError(msg)
876 return self.partitions[n]
877
878 def shuffle(
879 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