I have a dataframe like below.
| Id | arr_date | dep_date |
|---|---|---|
| 1 | 2022-01-12 | 2022-02-01 |
| 2 | 2022-01-20 | 2022-03-01 |
I want to do the comparison like,
arr_date <= dep_date + days(7).
How can I do this comparison using df.query() method in pandas? Can anyone please help me?
PS: I know how to do the comparison without df.query(). I only want to know how to do it with df.query()