I need for each day to know what the max value of the previous day was, example:
array with dates
date = np.array(['05/12/2017', '05/12/2017', '05/13/2017', '05/13/2017', '05/13/2017',
'05/13/2017', '05/14/2017', '05/15/2017', '05/15/2017', '05/15/2017',
'05/15/2017', '05/15/2017', '05/16/2017', '05/16/2017', '05/16/2017',
'05/16/2017', '05/16/2017' '05/16/2017', '05/17/2017', '05/17/2017'])
array with values:
value = np.array([13, 4, 5, 4, 17, 8, 5, 9, 17, 6, 11, 16, 12, 7, 7, 12, 17, 10, 16, 14])
result I need:
result = np.array([0, 0, 13, 13, 13, 13, 17, 5, 5, 5, 5, 5, 17, 17, 17, 17, 17, 17, 17, 17])