How to compare the columns of three tables of the model through a cycle and, if equal, send the current row to another model?

I have three table models.

In one column of the table, the data is in the form - date-time.
Each of the three tables has this column.
Dates may vary slightly.

And I need to copy the data from all three model tables into one empty model - only those rows - where the values in a certain column are equal to each other for these three model tables.
You can even do something similar by converting to a DataFrame .

How to compare the columns of three tables of the model through a cycle and, if equal, send the current row to another model?

Can I somehow sort in ascending order - by column - date time all tables of the model?

And then find the first values in the column (date time) and compare which of these values is the largest (from the three tables of the model - from the first rows of the column - date time).

And then delete those rows from the model if the value in the column (date time) of the table is greater than that found in the upper stage.

               datetime  temper_1  temper_2  g_rashod temper_nv
0   2023-01-02 10:00:00     58.13     49.35    70.520       1.4
1   2023-01-02 11:00:00     57.44     49.12    89.805       1.4
2   2023-01-02 12:00:00     57.82     49.30    89.187       1.4
3   2023-01-02 13:00:00     58.08     49.62    89.079       1.4
4   2023-01-02 14:00:00     58.20     49.77    89.081       2.1

225 2023-10-02 19:00:00     65.67     53.90    87.998      -7.6
226 2023-10-02 20:00:00     66.80     54.98    87.970      -8.1
227 2023-10-02 21:00:00     67.37     55.53    87.946      -8.1
228 2023-10-02 22:00:00     67.76     55.87    87.973      -8.1
229 2023-10-02 23:00:00     68.02     56.09    87.942      -8.1

               datetime  rashod_gas
0   2023-01-02 00:00:00       71.44
1   2023-01-02 01:00:00       71.55
2   2023-01-02 02:00:00       71.60
3   2023-01-02 03:00:00       71.58
4   2023-01-02 04:00:00       66.67

259 2023-11-02 19:00:00       92.33
260 2023-11-02 20:00:00       94.03
261 2023-11-02 21:00:00       92.46
262 2023-11-02 22:00:00       92.53
263 2023-11-02 23:00:00       92.58

It seems like you’re talking about a couple different things here.

Let’s separate these to try and avoid confusion.

So the first requirement you posted appears to be:

I’m assuming you want to do this when all three models have the same values for the same date, is that correct?

Please post your models here, it’s going to be a lot easier to talk about this in the context of your actual code.