how to cycle through coloms pandas

35

for idx, row in df.iterrows():
    if  df.loc[idx,'Qty'] == 1 and df.loc[idx,'Price'] == 10:
        df.loc[idx,'Buy'] = 1
for column in df:
    print(df[column])

Comments

Submit
0 Comments