我有一个数据帧df3:-
测试3.show()
+----------------------+-------------------+
|count(user_name)|count(team_id)|
+----------------------+-------------------+
| 10 | 10|
+----------------------+-------------------+
我需要在上面添加两列json
^{pr2}$上面我用StringType作为json的类型不可用
test_df3 = test_df3.withColumn("new",udf(col("count(user_name)"), col("count(team_id)"))).select("new")
目前没有回答
相关问题 更多 >
编程相关推荐