I have a dictionary that contains usernames as keys and dates as values.
my_dict = {'User1': '06/01/2020 01:09:42', 'User2': '06/01/2020 01:04:42'}
How can I find occurrences for each user before and after the date in the dictionary?
My dataframe looks something like this:
Username Date
User1 06/01/2020 00:40:41
User1 06/01/2020 00:45:42
User2 06/01/2020 00:54:42
User2 06/01/2020 01:04:42
User1 06/01/2020 01:08:42
User1 06/01/2020 01:09:42
User2 06/01/2020 02:10:42
User1 06/01/2020 04:10:42
User2 06/01/2020 05:10:42
For before I need to have:
Username Date
User1 06/01/2020 00:40:41
User1 06/01/2020 00:45:42
User2 06/01/2020 00:54:42
User1 06/01/2020 01:08:42
For after and the same I need to have:
Username Date
User2 06/01/2020 01:04:42
User1 06/01/2020 01:09:42
User2 06/01/2020 02:10:42
User1 06/01/2020 04:10:42
User2 06/01/2020 05:10:42
Thank you in advance.