Skip to content

Poop Code

  • Home
  • Linux

Make first row as column names in Pandas

October 21, 2024 by poopcode
new_header = df.iloc[0] #Get the first row for the header
df = df[1:] #Take the data less the header row
df.columns = new_header #Set the header row as the df header
Categories Python
How To Install Threading Module In Python With Code Examples
Convert epoch timestamp to JavaScript date
© 2025 Poop Code • Built with GeneratePress