I have to apply a filter with multiple conditions using OR on a pyspark dataframe.
I am trying to create a separate dataframe. Date value must be less than max_date or Date must be None.
How to do it?
I tried below 3 options but they all failed.
df.filter(df['Date'] < max_date or df['Date'] == None).createOrReplaceTempView("Final_dataset")
final_df = df.filter(df['Date'] != max_date | df['Date'] is None)
final_df = df.filter(df['Date'] != max_date or df['Date'] is None)