I need to lowercase the column names and and get rid of the gaps.
After using the method .lower()
I got an error:
'Index' object has no attribute 'lower'
What am I doing incorrectly?
Lower casing column names:
df.columns = df.columns.str.lower()
Deleting white spaces:
df.columns = df.columns.str.strip()