VOOZH about

URL: https://www.geeksforgeeks.org/pandas/add-a-row-at-top-in-pandas-dataframe/

⇱ Add a row at top in pandas DataFrame - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Add a row at top in pandas DataFrame

Last Updated : 11 Jul, 2025

Pandas DataFrame is two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). 
Let's see how can we can add a row at top in pandas DataFrame.
Observe this dataset first.
 

👁 Image

Code #1: Adding row at the top of given dataframe by concatenating the old dataframe with new one. 
 

Output: 
 

👁 Image


  
Code #2: Adding row at the top of given dataframe by concatenating the old dataframe with new one. 
 

Output: 
 

👁 Image


  
Code #3: Adding row at the top of given dataframe by concatenating the old dataframe with new one using df.ix[] method.
 

Output: 
 

👁 Image


 

Comment

Explore