I have the following dataframes:

```
print(df1)

day   month   quantity   Operation_type
21     6         6           2
24     6         4           2
...

print(df2)
day   month   quantity  Operation_type 
22     6         10          1
23     6         15          1
...

```

I would like to get the following dataset:

```
print(final_df)

day   month   quantity  Operation_type 
21     6         6             2
22     6         10            1
23     6         15            1
24     6         4             2
...

```

I tried using:

`final_df = pd.merge(df1, df2, on=['day','month'])` but it creates a huge dataset and does not seem to be working properly; 

Furthermore, if day and month are the same, I would like to paste the line whose `Operation_type == 2` before the one with `==1`.

How can I solve this problem?