I'm a new python learner who is trying to figure out how to populate multiple results based on if then conditions in python. I'm unsure how to utilize while loop function in order for me to pull multiple results.
For example,
if high >= (.20):
print('High level is Red')
elif med >= (.20):
print('Medium level is Red')
elif low >= (.20):
print('Low level is Red')
elif grand_total >= (.20):
print('Grand Total is Red')
else:
print('None')
As you can see, the above statement gives only one out of five options. But I'm trying to pull out ALL OF CORRECT conditions. Can someone please give me an advice? Thank you in advance!!
Also, I can't use for loop function either because they are all separate dataframes. Or is there any other way?