Use the following criteria to update the column names:
Make all the capitalization lowercase.
Remove any trailing whitespace from the end of the strings.
Replace spaces with underscores (’_’).
import re
def clean_col_names( df, ) :
""" df edited in place (no return value) """
# convert to lowercase, remove leading/trailing whitespace, replace space with _
mapper_dict = {col : col.lower().strip().replace(' ', '_') for col in df.columns }
df.rename( mapper_dict, inplace=True, axis=1 )
The site was not down but I can definitely see an error for this topic in our community logs. I will get it explored by our engineers during our upcoming community maintenance.