I have a cycle_2
df with the following column names:
3ls 3rs 3ls 3rs 3
absolute_cost 3.00 9.40 9.40 0.00 6.00
Now I need to rename them: I did the following:
cycle_2.rename(columns={cycle_2.columns[0]:'Email', cycle_2.columns[1]:'Flash', cycle_2.columns[2]:'Sms', cycle_2.columns[3]:'UPI', cycle_2.columns[4]:'IVR'})
However its printing this out:
Sms UPI Sms UPI IVR
absolute_cost 3.00 9.40 9.40 0.00 6.00
I am unable to understand why is this happeneing? How can I rename them?
Expected Output:
Email Flash Sms UPI IVR
absolute_cost 3.00 9.40 9.40 0.00 6.00