I want to replace a text from one collumn into another text in a different collumn and base the condition on two different input collumn/fields.
Collumn 1: Integers (from 1 to 10)
Collumn 2: 100 different combinations of this text type - '1 and 10'
New collumn:
When appears '10' on collumn1 and '1 and 10' on collumn2 replace with 'YPC5' AND ( other example) when appears '1' substitute by 'YPC5' and when appears '10' substitute for 'YPC8', becoming: 'YPC5 and YPC8'. But, if the field1 changes for '9' then 'YPC5 and YPC7'.
Is there a python script for doing this in a easier way than use a gigant 'replace(' and 'case then else' combined expression?