'two datasets, to find relation based on date range

I have two datasets, one is with time of Volcanoes eruption, the second with Earthquake. Both have "Date" column. I would like to run somehow loop to find out based on the dates if Earthquake is linked to Volcanoes eruption. The idea is that to check if the date of both events is close enough, lets say within 4 days range than create new column in Earthquake dataset and state yes or no (volcano related or no).... I have no idea even how to start if that is even possible. Here are the datasets:

enter image description here

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source