I have a Dataframe with 560 columns (numbered and named from 0 to 559). I'm trying to change the names of the last 10 columns by:
df.rename({550:'label',551:'mean',552:'std',553:'var',554:'med',555:'first',556:'last',557:'range',558:'min',559:'max'}, axis='columns')
However it doesn't seem to change anything:
print(df.columns.values)
>>>[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
...
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559]