jschulberg / Dog-Returns

A data science analysis to classify whether or not an adopted dog will be returned.
0 stars 0 forks source link

Merge Dog & Returns Lists Together #5

Closed jschulberg closed 2 years ago

jschulberg commented 2 years ago

Both lists can be joined on Dog ID

jschulberg commented 2 years ago

A quick join (using the code below) finds that 812/1028 of the returns in our Master_Return_List match back to our Master_Adoption_List. 216/1028 of the returns in our Master_Return_List don't match back. I'm documenting the reasons why some of them aren't matching back in this issue.

return_matches = pd.merge(all_returns_filtered, 
                          master_dog_adoption, 
                          left_on = 'LDAR ID #', 
                          right_on = 'ID', 
                          how = 'inner')

no_matches = all_returns_filtered[~all_returns_filtered['LDAR ID #'].isin(return_matches['ID'])]
jschulberg commented 2 years ago

Done! Code for this is included in the AnalysisPrep script. Looks like 7.8% of the dogs have been returned, while 92.2% have not been returned.