polars.Series.shuffle
-
Shuffle the contents of this Series.
- Parameters:
-
- seed
-
Seed for the random number generator. If set to None (default), a random seed is generated each time the shuffle is called.
Examples
>>> s = pl.Series("a", [1, 2, 3]) >>> s.shuffle(seed=1) shape: (3,) Series: 'a' [i64] [ 2 3 1 ]
Series.shuffle(
seed: int | None = None,
) → Series
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.shuffle.html