I have a DataFrame using pandas and column labels that I need to edit to replace the original column labels.
I\'d like to change the column names in a DataFrame
Just assign it to the .columns attribute:
.columns
>>> df = pd.DataFrame({'$a':[1,2], '$b': [10,20]}) >>> df.columns = ['a', 'b'] >>> df a b 0 1 10 1 2 20