I have a pandas dataframe as
my_df = pd.DataFrame({"months":[0,1,2,3,4,5], "value":[12,123,np.nan,234,345,456]})
I wanted to check for specific months(such as 0, 1, 3) any value is null or 0
I tried to do following way but does not work
if my_df[(my_df["months"].isin([0, 1, 3])) & (my_df["value"].isnull() | my_df["value"] == 0)].empty:
this still gives output as True