2888. Reshape Data: Concatenate | Python Solution | Time O(n+m) | Space O(n + m)
ApproachThe solution uses Pandas' built-in concat function to merge two DataFrames:
Use pd.concat():

Takes a list of DataFrames as input
Combines df1 and df2 v
## Approach

The solution uses Pandas' built-in concat function to merge two DataFrames:

1. Use pd.concat():
   - Takes a list of DataFrames as input
   - Combines df1 and df2 vertically
   - Maintains original column order and data types
   - Preserves index values from both DataFrames

This approach provides a straightforward way to combine two DataFrames while preserving their structure and data integrity.

## Complexity

- Time complexity: $$O(n + m)$$
  Where n and m are the number of rows in df1 and df2 respectively. The concat operation needs to process all rows from both DataFrames.

- Space complexity: $$O(n + m)$$
  The solution creates a new DataFrame containing all rows from both input DataFrames, requiring space proportional to their combined size.


# Code
```pythondata []
import pandas as pd

def concatenateTables(df1: pd.DataFrame, df2: pd.DataFrame) -> pd.DataFrame:
    return  pd.concat([df1, df2])
```
['Pandas']