nxcals.api.extraction.data.builders.DataFrame.agg

DataFrame.agg(*exprs: Union[Column, Dict[str, str]]) DataFrame

Aggregate on the entire DataFrame without groups (shorthand for df.groupBy().agg()).

New in version 1.3.0.

Examples

>>> df.agg({"age": "max"}).collect()
[Row(max(age)=5)]
>>> from pyspark.sql import functions as F
>>> df.agg(F.min(df.age)).collect()
[Row(min(age)=2)]