# last

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

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

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

## lastOrNull

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

