hipdf.DataFrame.scatter_by_map

hipdf.DataFrame.scatter_by_map#

19 min read time

Applies to Linux

DataFrame.scatter_by_map(map_index, map_size: int | None = None, keep_index: bool = True, debug: bool = False) list[Self]#

Scatter to a list of dataframes.

Uses map_index to determine the destination of each row of the original DataFrame.

Parameters#

map_indexSeries, str or list-like

Scatter assignment for each row

map_sizeint

Length of output list. Must be >= uniques in map_index

keep_indexbool

Conserve original index values for each row

Returns#

A list of cudf.DataFrame objects.

Raises#

ValueError

If the map_index has invalid entries (not all in [0, num_partitions)).