set header in dataframe 2nd line code example Example: set header in dataframe 2nd line In [23]: df.columns = df.iloc[1]