Skip to content

Instantly share code, notes, and snippets.

@siakon89
Created May 15, 2020 18:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save siakon89/ecfbb7cb3ff7afb3f10dc2ffec29fd15 to your computer and use it in GitHub Desktop.
# Select one column from your DataFrame
df.select("column").show()
# Select multiple columns from your DataFrame
df.select("column1", "column2").show()
# Select a column and add 1 to every entry
df.select(df.column + 1).show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment