Answers for "stack data horizontally pandas"

0

stack data horizontally pandas

import pandas as pd

df1 = pd.DataFrame({
    'A': [1,2,3,4,5],
    'B': [1,2,3,4,5]
})

df2 = pd.DataFrame({
    'C': [1,2,3,4,5],
    'D': [1,2,3,4,5]
})

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

print(df_concat)
Posted by: Guest on August-03-2020

Code answers related to "stack data horizontally pandas"

Python Answers by Framework

Browse Popular Code Answers by Language