I have two different dataframes shown below.
This is the tel_times dataframe
And this is the maint_comp1 dataframe.
Now, I have joined these two dataframes using merge.
maint_tel_comp1 = pd.merge(tel_times, maint_comp1, how='inner', left_on=['machineID','datetime_tel'], right_on = ['machineID','datetime_maint'])
The result is


