Df1
Date
2016-10-02
2016-08-22
2016-09-16
Df2
Low_Date Week
10/2/2016 Week 1
07/22/2016 Week 2
09/16/2016 Week 3
08/22/2016 Week 4
11/16/2016 Week 13
所有列都是dtype:object
我想在Df1中结束以下内容:
Date Week
2016-10-02 Week 1
2016-08-22 Week 4
2016-09-16 Week 3
我试过了:
Df1 = pd.merge(Df1,Df2,left_on='Date',right_on='Low_Date',right_index=False)
然而,这会返回一个空数据帧。这与日期的结构有关吗?我并不特别在意他们的结构,只想要周数。有什么建议吗?