📜  在没有组的情况下聚合整个 DataFrame - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:10.167000             🧑  作者: Mango

代码示例1
# Aggregate on the entire DataFrame without group

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)]