def test_monthly_diff_adds_to_first_quarter(self): """The deaccumulated GOV values in the monthly dataframe first quarter end should add up to the first quarter end in the quarterly dataframe. """ assert_frame_equal( diff_dfm.resample('Q').sum()[::4], # every quarter df_transform.rename(gov_dfq[gov_dfq.index.month == 3]))
def test_quarterly_diff_adds_to_annual(self): """The deaccumulated GOV values in the quarterly dataframe should add up to the last month in the year in the annual dataframe. """ assert_frame_equal( diff_dfq.resample('A').sum(), df_transform.rename(last_month_values))