access first column of row df code example Example: first row as column df df.rename(columns=df.iloc[0])