I have two data sets, both containing 'id' and 'datetime'.
Samples look like this :
Merging algorithm has two conditions.
I want to match left rows to one of the right row which is the nearest.
It should only match if the right datetime is a later datetime than the left datetime.
How can I merge these two dataframes?