# values

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

Return [Sequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/-sequence/) of values from one or several columns of [DataFrame](dataframe.html).

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

```
values(byRows: Boolean = false) 
    [ { columns } ]: Sequence<C>
```

See [column selectors](columnselectors.html) for how to select the columns for this operation.

Parameters:

* `columns` (optional) — subset of columns for values extraction

* `byRows: Boolean = false` — if `true`, data is traversed by rows, not by columns

```KOTLIN
df.values()
df.values(byRows = true)
df.values { age and weight }
```

## values in aggregation

In [groupBy](groupby.html#aggregation) and [pivot](pivot.html#aggregation) aggregations `values` function yields list of column values for every aggregated data group.

```KOTLIN
df.groupBy { A }.values { B }

df.pivot { A }.values { B }

df.pivot { A }.groupBy { B }.values { C and D }
```

