I have a data case like this:

I would like to know the closest date to the given date, but it should not exceed the given date.
Here's the data:

| Date\_1 | Date\_2 | Date\_3 | Given\_Date |
| --- | --- | --- | --- |
| 23/12/2022 12:56:49 | 27/12/2022 11:22:32 | 30/12/2022 12:32:53 | 26/12/2022 13:22:39 |
| 03/12/2022 11:23:46 | 05/12/2022 13:42:12 | 07/12/2022 11:11:21 | 08/12/2022 13:15:20 |
| 15/11/2022 09:07:56 | 16/11/2022 10:37:51 | 18/11/2022 21:13:22 | 16/11/2022 13:21:23 |

And I would like to categorize them like this:
\n
\n

| Date\_1 | Date\_2 | Date\_3 | Given\_Date | Closest\_Date |
| --- | --- | --- | --- | --- |
| 23/12/2022 12:56:49 | 27/12/2022 11:22:32 | 30/12/2022 12:32:53 | 26/12/2022 13:22:39 | Date\_1 |
| 03/12/2022 11:23:46 | 05/12/2022 13:42:12 | 07/12/2022 11:11:21 | 08/12/2022 13:15:20 | Date\_3 |
| 15/11/2022 09:07:56 | 16/11/2022 10:37:51 | 18/11/2022 21:13:22 | 16/11/2022 13:21:23 | Date\_2 |

How could I categorize them based on the given table using python?