I have dataframes in the form of:
price percentage
Date
2021-10-11 298.075989 NaN
2021-10-18 308.570007 0.035206
2021-10-25 308.130005 -0.001426
I would like to check whether all the percentages (except NaN) are above 2 percent and then I would like to print a certain statement. How do I do that? Thanks in advance
print('All Above 2%' if df['percentage'].dropna().gt(0.02).all() else 'Not All Above 2%')