tabsdata.tableframe.lazyframe.group_by.TableFrameGroupBy.max#

TableFrameGroupBy.max() TableFrame[source]#

Aggregation operation that computes the maximum value in the group for of all the non group by columns.

Examples:

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
┌──────┬──────┬──────┐
│ ss   ┆ u    ┆ ff   │
│ ---  ┆ ---  ┆ ---  │
│ str  ┆ i64  ┆ f64  │
╞══════╪══════╪══════╡
│ A    ┆ 1    ┆ 1.1  │
│ B    ┆ 0    ┆ 0.0  │
│ A    ┆ 2    ┆ 2.2  │
│ B    ┆ 3    ┆ 3.3  │
│ B    ┆ 4    ┆ 4.4  │
│ C    ┆ 5    ┆ -1.1 │
│ C    ┆ 6    ┆ -2.2 │
│ C    ┆ 7    ┆ -3.3 │
│ D    ┆ 8    ┆ inf  │
│ F    ┆ 9    ┆ NaN  │
│ null ┆ null ┆ null │
└──────┴──────┴──────┘
>>>
>>> tf.group_by("ss").max()
>>>
┌──────┬──────┬──────┐
│ ss   ┆ u    ┆ ff   │
│ ---  ┆ ---  ┆ ---  │
│ str  ┆ i64  ┆ f64  │
╞══════╪══════╪══════╡
│ null ┆ null ┆ null │
│ A    ┆ 2    ┆ 2.2  │
│ B    ┆ 4    ┆ 4.4  │
│ C    ┆ 7    ┆ -1.1 │
│ D    ┆ 8    ┆ inf  │
│ F    ┆ 9    ┆ NaN  │
└──────┴──────┴──────┘