pick first row and first column from pandas data frame code example Example: first row as column df df.rename(columns=df.iloc[0])