# shuffle

> For the complete documentation index, see [llms.txt](https://kotlin.github.io/dataframe/llms.txt).

Returns a new [DataFrame](dataframe.html) with rows in random order.

API reference: [shuffle](https://kotlin.github.io/dataframe/api-docs/core/org.jetbrains.kotlinx.dataframe.api/shuffle.html)

You can supply a [kotlin.random.Random](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.random/-random/) instance with a fixed seed for reproducible results.

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

If called on a [DataColumn](datacolumn.html), returns a new [DataColumn](datacolumn.html) with the same values in random order using the provided source of randomness or the default randomness.

## Examples

```KOTLIN
df
```

[Embedded content](./resources/notebook_test_shuffle_1.html)

Deterministic shuffle using a fixed seed:

```KOTLIN
df.shuffle(Random(42))
```

[Embedded content](./resources/notebook_test_shuffle_2.html)

