dates, and values are corelated. I am trying to code a function where it filters out all the values in the values array after the given_date. Since the given_date is '2017-09-15 11:40:30', The first two indexes in dates '2017-09-15 07:11:00' ,'2017-09-15 11:25:30' comes before the given_date so the first tow indexes in values is filtered out. Resulting in the Expected Output. How would I be able to do that?
given_date= '2017-09-15 11:40:30'
dates= np.array(['2017-09-15 07:11:00' ,'2017-09-15 11:25:30', '2017-09-15 12:11:10', '2021-04-07 22:43:12', '2021-04-08 00:49:18'])
values= np.array([10,30,44,55,60])
Expected Output:
[44,55,60]