how to remove the spaces after the Dots in pandas

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