0

I want to iterate across multiple elements within a list to replace matched strings with another string.

e.g. my reference list is the following

Old-fruit New-fruit
apple orange
pear plum

The first problem I have, is that not all elements of my list are relevant (i.e. they aren't about fruits so don't need anything to be done).

The second problem I have, is that whilst I would like to rename columns relevant to fruits, these columns are not always the same name. E.g. the reference columns are old_fruit, new_fruit and some of the columns in the entities are fruits or favourite_fruits etc.

Could someone help me figure this out?

Many thanks.

xoxo
  • 53
  • 7

0 Answers0