How do i change the column names from existing to a row below in a dataframe in pandas

Viewed 34

gg

Here is the current dataframe as shown in the pic. above.

i want new dataframe with columns as month1, month2, month3.... month5

here is the pic of output dataframe that is required

enter image nnnnn here

1 Answers

You can do the following: df = df.drop(0, axis=0)

or inplace, like: df.drop(df.index[0], axis=0, inplace=True)

Related