Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playerid_lookup("tatis", "fernando", fuzzy=True) returns duplicate rows for Fernando Tatis #358

Open
dhmistry3 opened this issue May 15, 2023 · 1 comment

Comments

@dhmistry3
Copy link

The chadwick name for tatis and his father are the same, so when doing the merge it ends up duplicating the rows for both, so ends up with a couple duplicate rows.

@mhmills
Copy link

mhmills commented Jul 25, 2023

Note that this issue only occurs when fuzzy=True and the name searched is not an exact match. Like you said, it looks like this is an issue with the merge in get_closest_names(), which is called in search() when there are 0 exact matches and fuzzy is True. There are no exact matches for your search because it is Tatís (with the accented í) and not Tatis, which is what you searched. The same bug appears if you were to search "Valdimi Guerrero" with fuzzy=True, which would result in duplicate rows for Vladimir Guerrero Jr and Sr. However if you search playerid_lookup("tatís", "fernando", fuzzy=True), you would get the expected result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants