I have the following list of list:
[[Timestamp('2018-04-07 00:00:00'), Timestamp('2018-07-07 00:00:00'),Timestamp('2020-04-07 00:00:00')], [Timestamp('2018-04-07 00:00:00'),Timestamp('2018-10-07 00:00:00'),Timestamp('2018-12-07 00:00:00'),Timestamp('2021-04-07 00:00:00'),Timestamp('2022-04-07 00:00:00'),Timestamp('2023-04-07 00:00:00')]
And my question is if it is possible filter the list of lists by another date. For example: If I choose this date:
datetime.datetime(2019, 1, 26, 0, 0)
Is there a way to filter the list of lists to just taking those dates that are higher than the date I choose and also the last one before my date? For example for the first list of the lists I want to keep the values:
[Timestamp('2018-07-07 00:00:00'),Timestamp('2020-04-07 00:00:00')]
And for the second list of the list of lists:
[Timestamp('2018-12-07 00:00:00'),Timestamp('2021-04-07 00:00:00'),Timestamp('2022-04-07 00:00:00'),Timestamp('2023-04-07 00:00:00')]