Answers for "how to add average of a group as a column to a datafram pyspark"

0

pyspark group by and average in dataframes

df.groupBy("Profession").agg({'Age':'avg', 'Gender':'count'}).show()
Posted by: Guest on December-01-2020

Code answers related to "how to add average of a group as a column to a datafram pyspark"

Python Answers by Framework

Browse Popular Code Answers by Language