llms.txt: machine-readable documentation index. Markdown version of this page is also available.

DataFrame Help

shuffle

Returns a new DataFrame with rows in random order.

API reference: shuffle

You can supply a kotlin.random.Random instance with a fixed seed for reproducible results.

df.shuffle() df.shuffle(random: Random)

If called on a DataColumn, returns a new DataColumn with the same values in random order using the provided source of randomness or the default randomness.

Examples

df

Deterministic shuffle using a fixed seed:

df.shuffle(Random(42))
02 November 2026