polars.DataFrame.row

DataFrame.row(index: int) Tuple[Any]

Get a row as tuple.

Parameters
index

Row index.

Examples

>>> df = pl.DataFrame(
...     {
...         "foo": [1, 2, 3],
...         "bar": [6, 7, 8],
...         "ham": ["a", "b", "c"],
...     }
... )
>>> df.row(2)
(3, 8, 'c')