Created
May 15, 2020 18:37
-
-
Save siakon89/c470fb04187fc672d425d593b3e2b420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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