python trim whitespace all columns code example Example: python - remove exta space in column df.Name = df.Column_Name.replace('\s+', ' ', regex=True)