Pandas Find Fifth Caracter In Field And Change Cell Based On That Number Code Example

Snippet 1
  df['col1'] = np.where(df['col1'] == 0, df['col2'], df['col1'])
df['col1'] = np.where(df['col1'] == 0, df['col3'], df['col1']) 
Snippet 2
  data['result'] = data['result'].map(lambda x: x.lstrip('+-').rstrip('aAbBcC'))