Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Last active January 13, 2020 03:52
Show Gist options
  • Save lakshay-arora/cb1e4b3618029f9be3306bffb696996e to your computer and use it in GitHub Desktop.
Save lakshay-arora/cb1e4b3618029f9be3306bffb696996e to your computer and use it in GitHub Desktop.
# create dataframe
data_frame = sql_context.createDataFrame(parsed)
# view the dataframe
data_frame.show(5)
# value counts of gender
data_frame.groupby('gender').count().show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment