I am parsing data from an Excel file that has extra white space in some of the column headings.
When I check the columns of the resulting dataframe, like so:
The result looks like this:
Index(['Year', 'Month ', 'Value'])
Consequently, I can't run
Because it will tell me the column is not found, as I asked for "Month", not "Month ".
My question, then, is how can I strip out the unwanted white space from the column headings?