How to add prefix to only certain columns in python
How to add prefix to only certain columns in python Question: I have a dataframe with 5 columns, say ‘A’, ‘B’, ‘C’, ‘D’, and ‘E’. I only want to add a prefix to columns ‘D’ and E. I have tried the following, but got an error message saying "Index does not support mutable operations". df.columns[-2:] …