下面是一个Pyspark数据框架,我需要用groupby来求和行的值。
load_dt|org_cntry|sum(srv_curr_vo_qty_accs_mthd)|sum(srv_curr_bb_qty_accs_mthd)|sum(srv_curr_tv_qty_accs_mthd)|
+-------------------+---------+------------------------------+------------------------------+------------------------------+
|2021-12-06 00:00:00| null| NaN| NaN| NaN|
|2021-12-06 00:00:00| PANAMA| 360126.0| 214229.0| 207950.0|
1.groupby(load_dt,org_cntry)
2.行值之和(sum(srv_curr_vo_qty_accs_mthd)|sum(srv_curr_bb_qty_accs_mthd)|sum(srv_curr_tv_qty_accs_mthd)|
load_dt org_cntry total_sum
2021-12-06 Panama 782305