I'm trying to iterate through a DataFrame with a for loop but I'm getting this error:
"ValueError: The truth value of a Series is ambiguous."
And I would like to iterate through "Plataforma " and "Soporte" to replace 'Soporte' values. I am using this:
for index, row in informe.iterrows():
if informe.loc[index, 'Plataforma'] == 'Taboola':
informe['Soporte'].str.replace('performance-prospecting_tconvergentes', 'Prospecting_Taboola_tconvergentes')
informe['Soporte'].str.replace('performance-prospecting_tmoviles', 'Prospecting_Taboola_tmoviles')
informe['Soporte'].str.replace('performance-prospecting', 'Prospecting_Taboola')
elif informe.loc[index, 'Plataforma'] == 'Yahoo':
informe['Soporte'].str.replace('performance-prospecting_tconvergentes', 'Prospecting_Yahoo_tconvergentes')
informe['Soporte'].str.replace('performance-prospecting_tmoviles', 'Prospecting_Yahoo_tmoviles')
informe['Soporte'].str.replace('performance-prospecting', 'Prospecting_Yahoo')
Thanks in advance.