Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Filter your DataFrame and select a column
df.filter(df.column1 > 20).select("column2").show()
# Filter your DataFrame with AND
df.filter((df.column1 > 20) & (df.column2 < 10)).select("column2").show()
# Filter your DataFrame with OR
df.filter((df.column1 > 20) | (df.column2 < 10)).select("column2").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.