python use 2nd row for column names reindex code example
Example 1: first row as column df
df.rename(columns=df.iloc[0])
Example 2: set header in dataframe 2nd line
In [23]: df.columns = df.iloc[1]
df.rename(columns=df.iloc[0])
In [23]: df.columns = df.iloc[1]