它可以在没有聚合或计数的情况下遍历Pyspark groupBy数据帧吗?例如Pandas中的代码: for i, d in df2:Is there a difference in howto iterate groupby in Pyspark or have to use aggregation and count?
我有一个很大的df.pandas,我想做一个函数来按一列分组,并计算另一列中的唯一值,然后返回最大计数值的索引,如下所示: x = df.groupby(by=df['Column1'])['Column2'].nunique()groupby_fun()'builtin_function_or_method