Answers for "how to append two concatenate pandas"

0

pandas concat / merge two dataframe within one dataframe

In [9]: result = pd.concat([df1, df4], axis=1)
Posted by: Guest on July-01-2021
0

append two dataframes pandas

import pandas as pd

# First DataFrame
df1 = pd.DataFrame({'id': ['A01', 'A02', 'A03', 'A04'],
                    'Name': ['ABC', 'PQR', 'DEF', 'GHI']})
  
# Second DataFrame
df2 = pd.DataFrame({'id': ['B05', 'B06', 'B07', 'B08'],
                    'Name': ['XYZ', 'TUV', 'MNO', 'JKL']})
  
frames = [df1, df2]
  
result = pd.concat(frames)
Posted by: Guest on July-16-2021

Code answers related to "how to append two concatenate pandas"

Python Answers by Framework

Browse Popular Code Answers by Language