Hugo
Hugo

Reputation: 1698

How do I join columns from different Pandas DataFrames?

I have two Dataframes with a single column and a common date index. How do I create a THIRD dataframe with the same date index and a copy of both columns?

Upvotes: 0

Views: 68

Answers (1)

dnll
dnll

Reputation: 677

If df1 and df2 have the same index:

df_joined = df1.join(df2)

Here is the documentation.

Upvotes: 2

Related Questions