I have a dataframe and I want to change the characters under the column Model
. I want to use the codes solely and not the definition of the codes.
import pandas as pd
data = {
'Model': ['Audi', 'Mercedes', 'Volkswagen'],
'Code': ['["CFA4 - replace filters"]', '["C09 - reboot the engine"]', '["O06 - clean the exhaust pipe"]']
}
df = pd.DataFrame(data)
Desired output
Model Code
Audi CFA4
Mercedes C09
Volkswagen O06