I'm not entirely sure how to go about solving problems, but here is one I'm encountering:
for row in concat_data.index:
if (concat_data['% interest'][row]).str.contains('%'):
concat_data['% interest'] = concat_data['% interest'].str.split('%', expand=True)
concat_data is my dataframe, I would like to iterate through each row of the '% interest' column and split at '%' if it is found in that cell.
The error message is:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I have tried using .any(), but it also hasn't worked.
I added a print(concat_data['% interest'][row])
and it says that it's a Series.
Any help would be appreciated it, thank you!