I have a few lines of code and I don't understand why I encounter this error and it doesn't return print 'help' 3 times.
import pandas as pd
d = {'lei': ['lei1', 'lei2'], 'B': [30, 40], 'C': [50, 60],'D': [70, 80],'E': [0, 90],'F': [0, 20]}
df = pd.DataFrame(data=d)
l = 'lei1'
l_index = df[df['lei'] == l].index
mm = ['B', 'C', 'D', 'E', 'F']
for m in mm:
if df.loc[l_index][m]>0:
print('help')
Thanks for your help!