**Input:df1**+------------+---------+-----+| student_id | name | age |+------------+---------+-----+|1| Mason |8||2| Ava |6||3| Taylor |15||4| Georgia |17|+------------+---------+-----+**df2**+------------+------+-----+| student_id | name | age |+------------+------+-----+|5| Leo |7||6| Alex |7|+------------+------+-----+Output:
+------------+---------+-----+| student_id | name | age |+------------+---------+-----+|1| Mason |8||2| Ava |6||3| Taylor |15||4| Georgia |17||5| Leo |7||6| Alex |7|+------------+---------+-----+Explanation: The two DataFramess are stacked vertically, and their rows are combined.## Solution
### Method 1- Pandas Concat
#### Intuition
To stack two DataFrames vertically, use pandas'`concat`function.#### Approach
Call `pd.concat([df1, df2], ignore_index=True)` to combine the rows.#### Code