Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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)
Comment

PREVIOUS NEXT
Code Example
Python :: change plot size matplotlib 
Python :: create dictionary from input python 
Python :: pandas read cell value by index and column name 
Python :: pandas series quantile 
Python :: date object into date format python 
Python :: sum of any numbers in python 
Python :: how to make minecraft using python 
Python :: python for loop counter 
Python :: conda env 
Python :: pyttsx3 set volume 
Python :: discord.py embeds 
Python :: threading python 
Python :: pandas replace string with another string 
Python :: clean punctuation from string python 
Python :: random picker in python 
Python :: get only first 10 columns pandas 
Python :: selection sort python 
Python :: get a slice of string in python 
Python :: python how to split a number 
Python :: add time to a datetime object 
Python :: get rid of unnamed column pandas 
Python :: To View the entire Row and Column in a Dataframe 
Python :: python ternary 
Python :: unshorten url python 
Python :: how to sort values of pandas dataframe for iqr 
Python :: how to ask a yes or no question on python 
Python :: fillna with mode pandas 
Python :: time addition in python 
Python :: how to save a python object in a file 
Python :: Create list with numbers between 2 values 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =