You can use the concat
function for this (axis=1
is to concatenate as columns):
pd.concat([df1, df2], axis=1)
See the pandas docs on merging/concatenating: http://pandas.pydata.org/pandas-docs/stable/merging.html
More Related Contents:
- How to iterate over rows in a DataFrame in Pandas
- Selecting with complex criteria from pandas.DataFrame
- Combine two pandas Data Frames (join on a common column)
- Restart cumsum and get index if cumsum more than value
- Remove non-numeric rows in one column with pandas
- How to deal with multi-level column names downloaded with yfinance
- Replace all occurrences of a string in a pandas dataframe (Python)
- Running get_dummies on several DataFrame columns?
- ValueError: numpy.dtype has the wrong size, try recompiling
- Get business days between start and end date using pandas
- AttributeError: ‘PandasExprVisitor’ object has no attribute ‘visit_Ellipsis’, using pandas eval
- Pandas reading csv as string type
- Convert pandas DateTimeIndex to Unix Time?
- Python Pandas read_csv skip rows but keep header
- Python Pandas Replacing Header with Top Row
- pandas dataframe select columns in multiindex [duplicate]
- Selecting/excluding sets of columns in pandas [duplicate]
- What is the fastest and most efficient way to append rows to a DataFrame?
- pandas distinction between str and object types
- pandas group by and find first non null value for all columns
- Reverse a get_dummies encoding in pandas
- Seaborn Bar Plot Ordering
- pandas divide row value by aggregated sum with a condition set by other cell
- how to concat two data frames with different column names in pandas? – python
- Pandas – Interleave / Zip two DataFrames by row
- Python Pandas – Read csv file containing multiple tables
- How to iterate over columns of pandas dataframe to run regression
- Load CSV to Pandas MultiIndex DataFrame
- Python pandas – new column’s value if the item is in the list
- bash: Python import – Command not found for pandas