I have a list with strings that are basically names of programs that doens't follow a formatting pattern, such as: [program1, prOgrAM2, program3_US, ..., progrAmN]
. This list is a reference and should not be altered.
I am working with a pandas.DataFrame
which is data collected from a .csv file and there is a column target_program
. This column has values contained in my list, but not guaranteed it follows the same pattern. I would like to normalize this column according to the list, ie:
List
[program1, program_2, ...]
Column
[prograM1, progrAm1, PROGRAM2, proGram2, ....]
=>
Column after normalization:
[program1, program1, program_2, program_2, ...]
Thanks