# first

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

Returns the first [row](datarow.html) that matches the given [condition](datarow.html#row-conditions), or throws an exception if there are no matching rows.

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

## firstOrNull

Returns the first [row](datarow.html) that matches the given [condition](datarow.html#row-conditions), or `null` if there are no matching rows.

