Skip to content

Instantly share code, notes, and snippets.

@akanik
Created March 21, 2023 18:39
Show Gist options
  • Save akanik/bf2407c1f5b4898c4e96df3173031b35 to your computer and use it in GitHub Desktop.
Save akanik/bf2407c1f5b4898c4e96df3173031b35 to your computer and use it in GitHub Desktop.
Pandas make header into row in dataframe
df.loc[len(df.index)] = list(df.columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment