2

I just realized, that

pd.merge(df1, df2, how='outer', left_index=True, right_index=True)

does not seem to work for multiple, i.e. 5 DataFrames?

All the 5 data frames have the same index called "time". Also, all have the same column named "temperature".

Can this be done?

Hint: I experimented with join. but wasn't happy with the result.

RPacker
  • 173
  • 1
  • 3
  • 10

1 Answers1

3

pd.concat() method can concatenate a list of DataFrames:

pd.concat([df1, df2, df3, df4, df5], axis=1)
MaxU - stop genocide of UA
  • 191,778
  • 30
  • 340
  • 375