eapeyton
0
Q:

dataframe concatenate

df_col = pd.concat([df1,df2], axis=1)

df_col
11
import pandas as pd
df = pd.concat(list_of_dataframes)
1
# Pandas for Python

df['col1 & col2'] = df['col1']+df['col2']

#Output
#col1	col2	col1 & col2
#A1		A2		A1A2
#B1		B2		B1B2
4
# Python program to merge 
# dataframes using Panda 
  
# Dataframe created 
left = pd.DataFrame({'Key': ['K0', 'K1', 'K2', 'K3'], 
                    'A': ['A0', 'A1', 'A2', 'A3'], 
                    'B': ['B0', 'B1', 'B2', 'B3']}) 
  
right = pd.DataFrame({'Key': ['K0', 'K1', 'K2', 'K3'], 
                      'C': ['C0', 'C1', 'C2', 'C3'], 
                      'D': ['D0', 'D1', 'D2', 'D3']}) 
                        
# Merging the dataframes                       
pd.merge(left, right, how ='inner', on ='Key') 
-1

New to Communities?

Join the community