Fix errors on a python ML code -- 3

Job ID: 33819079

Budget: $10 – $30 USD

Hi Experts,
I have an ML code dropping pairs because previous data does not exist. I need an expert to modify this block of code to run if either of the pair exists.

Also, the code seems to be overfitting, you can assist.