How can I make this if statement work with multiple conditions

Viewed 15

I have multiple dataframes and created a list group to filter data in a column. How can I fix the below script?

 dic = [df1,df2,df3,df4]
 group = ['CON', 'ECO', 'MAN', 'POL', 'DIP']
  for i in dic:  
     if i['pgp'].isin(group) & i['egp'] == i['pgp']:
        i['col_value'] == 1
     elif:
        i['col_value'] == 0
     else:
        if i['pgp'].not in(group)
        i['col_value'] == 2]
0 Answers
Related