Python Pandas Trim -Werte im DataFrame

# Trim all whitespaces in dataframe
df = df.replace(r'\s*(.*?)\s*', r'\1', regex=True)

# Trim all whitespaces in a column or series
df = df["column"].str.strip()
Kwams