def test_cumulative():
    valid_data = create_test_data()
    valid_data.index = ['row_1', 'row_1', 'row_2']
    valid_data.loc[:, 'period'] = valid_data.index
    valid_data.loc[:, 'value'] = valid_data['col_1']
    expected = pd.DataFrame({
        'period': ['row_1', 'row_2'],
        'value': [3, 3]
    }).set_index('period')
    assert_frame_equal(
        feature_extractions.cumulative(valid_data, 'period', 'value'),
        expected)
def ay_cumulative(timeseries, group='period', value='value'):
    cumulative_value = feature_extractions.cumulative(timeseries, group, value)
    return distance_matrix.euclidean_dist_matrix(cumulative_value)