1def clean_col(col):
2 col = col.strip()
3 col = col.replace("(","")
4 col = col.replace(")","")
5 col = col.lower()
6 return col
7
8new_columns = []
9for c in df.columns:
10 clean_c = clean_col(c)
11 new_columns.append(clean_c)
12
13df.columns = new_columns
14print(df.columns)