- Series.shuffle(seed: int | None = None) Series #
Shuffle the contents of this Series.
Seed for the random number generator. If set to None (default), a random seed is generated each time the shuffle is called.
>>> s = pl.Series("a", [1, 2, 3]) >>> s.shuffle(seed=1) shape: (3,) Series: 'a' [i64] [ 2 1 3 ]