Use str.replace
:
>>> df
Author
0 J. K. Rowling
df['Author'] = df['Author'].str.replace(r'\.\s+', '.')
print(df)
# Output
Author
0 J.K.Rowling
Use str.replace
:
>>> df
Author
0 J. K. Rowling
df['Author'] = df['Author'].str.replace(r'\.\s+', '.')
print(df)
# Output
Author
0 J.K.Rowling