Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# GroupBy a column and count
# GroupBy a column and sum
# GroupBy with multiple columns
df.groupby("column1", "column2").count().show()
# GroupBy with multiple columns and sum multiple columns
df.groupby("column1", "column2").sum("column3", "column4").show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.