Columns can be renamed using the appropriately named .rename() method. This method can be passed a dictionary object where the keys represent the labels of the columns that are to be renamed, and the value for each key is the new name.
The following will change the name of the 'Book Value' column to 'BookValue', removing the space and allowing access to that column's data using property notation.
Using .rename() in this manner returns a new data frame with the columns renamed and the data copied from the original. The following verifies that the original was not modified.
To modify the data frame in-place without making a ...