SyntaxFix
Write A Post
Hire A Developer
Questions
If you want a one-liner, you can do:
df.rename(columns=df.iloc[0]).drop(df.index[0])