I have a column:
df["temp_column"] = ['E300', 'C43 AMG Coupe', 'S63 AMG Coupe', 'C300 Coupe',
'C300 4Matic Coupe', 'E400', 'S560', 'CLS53 4 Dr Coupe',
'E53 Coupe', 'E53', 'CLS450 4 Dr Coupe', 'AMG GT63', 'AMG GT53',
'E350/E400 Coupe', 'E63', 'CLA250', 'AMG GT',
'E350/E400 4Matic Coupe', 'SL550', 'SLC300', 'SL450', 'SLC43',
'GLA250', 'GLC300', 'GLC43', 'GLC300 AMG Coupe', 'GLC43 AMG Coupe',
'GLC350e', 'GLC63', 'GLC63 Coupe', 'GLE350', 'GLE400',
'GLE43 Coupe', 'G550', 'GLS450', 'GLS550', 'GLS63', 'S560 Coupe',
'C63 AMG Coupe','GLE63 S Coupe', 'GLE580', 'GLS580', 'CLA35 AMG Coupe',
'AMG GT43', 'GLB 35', 'GLA35', 'GLS600', 'S580', 'S500']
I have change values in the column in such a way that:#
1. C43 AMG Coupe -> C43C
2. S63 AMG Coupe -> S63C
3. C300 4Matic Coupe -> C300C
4. GLC63 Coupe -> GLC63 Coupe #should not change
5. CLA35 AMG Coupe -> CLA35C
6. GLC300 AMG Coupe -> GLC300 Coupe
7. GLC43 AMG Coupe -> GLC43 Coupe
8 GLE63 S Coupe-> GLE63 Coupe
9. CLS53 4 Dr Coupe -> CLS53C
Is there a way where I can change these without using if else loop? (NOTE: GLE, GLE brands should have Coupe, remaining gets replaces with C)