Creating column 'Location English' in df. Have to convert location in kannada in 'Location' column to english. The column 'Location English' just has Ajekar in english and all other location in kannada.
df['Location English'] = df['Location'].apply(lambda s: s.replace('ಶಂಕರನಾರಯಣ', 'Shankaranarayana'))
df['Location English'] = df['Location'].apply(lambda s: s.replace('ಕಾರ್ಕಳ', 'Karkala'))
df['Location English'] = df['Location'].apply(lambda s: s.replace('ಅಜೆಕಾರು', 'Ajekar'))
Each time you read from
df['Location']
, which is not changed, so it overwrites the previous values ofdf['Location English']
. You can apply all of your changes like this: