pandas set data type of column first row is label code example Example: first row as column df df.rename(columns=df.iloc[0])