I'm trying to filter a dataframe based on the following conditions, if end_date is Nan OR if the end_date is greater than the current date.
How exactly can I do this?
I'm using the following code, I am aware the | and & operators are series operators.
end_series = ((~df.end_date.notna()) | (df.end_date > datetime.datetime.utcnow().date()))
new_df = df[(df.column1 > 0) & end_series].copy()