Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pyspark average group by

from pyspark.sql import functions as F
df.groupBy("Profession").agg(F.mean('Age'), F.count('Age')).show()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pyspark #average #group
ADD COMMENT
Topic
Name
2+6 =