polars.DataFrame.min#

DataFrame.min(axis: int | None = None) Self | Series[source]#

Aggregate the columns of this DataFrame to their minimum value.

Parameters:
axis

Either 0 (vertical) or 1 (horizontal).

Deprecated since version 0.19.14: This argument will be removed in a future version. This method will only support vertical aggregation, as if axis were set to 0. To perform horizontal aggregation, use min_horizontal().

Examples

>>> df = pl.DataFrame(
...     {
...         "foo": [1, 2, 3],
...         "bar": [6, 7, 8],
...         "ham": ["a", "b", "c"],
...     }
... )
>>> df.min()
shape: (1, 3)
┌─────┬─────┬─────┐
│ foo ┆ bar ┆ ham │
│ --- ┆ --- ┆ --- │
│ i64 ┆ i64 ┆ str │
╞═════╪═════╪═════╡
│ 1   ┆ 6   ┆ a   │
└─────┴─────┴─────┘