Pandas 添加两列具有不同日期的时间序列数据帧

Pandas 添加两列具有不同日期的时间序列数据帧,pandas,dataframe,addition,Pandas,Dataframe,Addition,我希望添加两列不同的日期范围 column 1 = values with date index 2 Nov to 23 Nov column 2 = values with date index 27 Oct to 17 Nov Resultant = addition of values in column 1 and column 2 of 27 Oct to 23 Nov 样本图片附上 dataframeA的第1列包含11月2日至11月23日的数据;每个元素 它的值为100 数据

我希望添加两列不同的日期范围

column 1 = values with date index 2 Nov to 23 Nov
column 2 = values with date index 27 Oct  to 17 Nov

Resultant = addition of values in column 1 and column 2 of 27 Oct to 23 Nov
样本图片附上

  • dataframeA的第1列包含11月2日至11月23日的数据;每个元素 它的值为100
  • 数据帧B的第2列有10月27日至11月17日的数据;每个元素的值为200
  • 结果将是包含所有日期的这些列的数据总和
  • df1:

        Date        Value
    0   2-11-2020   21.0
    1   3-11-2020   4.0
    2   4-11-2020   6.0
    
        Date        Value
    0   3-11-2020   2.0
    1   4-11-2020   2.0
    2   5-11-2020   7.0
    
        Date        Value
    0   2-11-2020   21.0
    1   3-11-2020   6.0
    2   4-11-2020   8.0
    3   5-11-2020   7.0
    
    df2:

        Date        Value
    0   2-11-2020   21.0
    1   3-11-2020   4.0
    2   4-11-2020   6.0
    
        Date        Value
    0   3-11-2020   2.0
    1   4-11-2020   2.0
    2   5-11-2020   7.0
    
        Date        Value
    0   2-11-2020   21.0
    1   3-11-2020   6.0
    2   4-11-2020   8.0
    3   5-11-2020   7.0
    
    应该是:

    df = df1.set_index('Date').add(df2.set_index('Date'), fill_value=0).reset_index()
    

    df:

        Date        Value
    0   2-11-2020   21.0
    1   3-11-2020   4.0
    2   4-11-2020   6.0
    
        Date        Value
    0   3-11-2020   2.0
    1   4-11-2020   2.0
    2   5-11-2020   7.0
    
        Date        Value
    0   2-11-2020   21.0
    1   3-11-2020   6.0
    2   4-11-2020   8.0
    3   5-11-2020   7.0
    

    请提供一个可复制的示例,通过发布带有预期输出的示例输入数据框。