0

In a dataframe I would like to replace values in 2 columns, for certain IDs that are in another column. To be more specific:

globalprocudt_all dataframe: enter image description here

I have 34 identifier in a list, and I would like to iterate through the list and do this change:

list = ['8012542891901',
'4001869429854',
'4001869429816',
'4001869429809',
'4001869429762',
'4001869429755',
'4001869429717',
'4001869429700',
'4001869429687',
'4001869429670']
for i in list: 
globalproduct_all.loc[globalproduct_all.identifier == i, ['ETIM_class_cat', 'ETIM_class']] = "EC000042", "Miniature circuit breaker (MCB)"

I get this error message: enter image description here

How can I make this work? thank you

1 Answers1

0

oh sorry, I needed to add a tab before the code... then it works