Multiple ways to filter dataframe data:
- filter
- df.filter(df.ColumnName ==VALUE)
- df.filter(col("ColumnName") == VALUE)
- df.filter((col("ColumnName1") == VALUE) | (col("ColumnName2") == VALUE))
- df.filter((col("ColumnName1") == VALUE) & (col("ColumnName2") == VALUE))
- df.filter(col("ColumnName") != VALUE)
No comments:
Post a Comment