I have three dataframes with index as date and a price column. I want to merge three dataframes into one and merge price column. I tried merge right as suggested by this post Python: pandas merge multiple dataframes but the result is same as concatenation with axis =1.
chained_price = reduce(lambda left, right: pd.merge(left, right, left_index=True, right_index = True,
how='right'), product_list)
product_list is a list with three df.
price
date
2013-09-10 1.000000
2013-09-11 1.011578
2013-09-12 -1.006452
price
date
2013-09-11 3.011578
2013-09-12 5.006452
2013-09-13 6.000544
price
date
2013-09-12 8.011578
2013-09-13 7.006452
2013-09-14 10.000544
expected result:
price
date
2013-09-10 1.000000
2013-09-11 3.011578
2013-09-12 8.011578
2013-09-13 7.006452
2013-09-14 10.000544
Any advice?