Remove space in column name in Pandas

Referring a column with space in tricky, so pandas provides a handy way to remove spaces from column names.

Code :
df.columns.str.replace(' ', '')


dataframe.columns provides an array of all columns present in data frame.