DataFrame.
agg
Aggregate on the entire DataFrame without groups (shorthand for df.groupBy().agg()).
DataFrame
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)]
previous
pyspark.sql.DataFrameWriter.text
next
pyspark.sql.DataFrame.alias