# 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