I need to rename all the columns of a dataframe (pandas) with ~100 columns. I created a list with all the new names stored and i need a handy function to rename them. Many solutions online are dealing "manually" be stating the old column name, which is not possible with this size.
I tried a simple for loop like:
for i in range(0,96):
df.columns[i] = new_cols_list[i]
That is the way i would do it in r, but it throws an error:
"Index does not support mutable operations"