I have created a pandas dataframe as follows:
import pandas as pd
ds1 = {'Name':["SANAVBARI NIKITENKO","ALEXANDER SASHA ROMANOV","Axmadova Aminat Ramzanovna"]}
df1 = pd.DataFrame(data=ds1)
The dataframe looks like this:
print(df1)
Name
0 SANAVBARI NIKITENKO
1 ALEXANDER SASHA ROMANOV
2 Axmadova Aminat Ramzanovna
I need to create a new column (called matchKey
) in which the first letter of each word inside the column Name
is in upper case and the rest of the word is in lower case.
From the example above, the resulting dataframe would look like this:
Does anyone know how to do it in python by any chance, please?