polars.Series.list.take#

Series.list.take(
indices: Series | list[int] | list[list[int]],
*,
null_on_oob: bool = False,
) Series[source]#

Take sublists by multiple indices.

Deprecated since version 0.19.14: This method has been renamed to gather().

Parameters:
indices

Indices to return per sublist

null_on_oob

Behavior if an index is out of bounds: True -> set as null False -> raise an error Note that defaulting to raising an error is much cheaper