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

Update playerid_lookup to account for common nicknames #260

Closed
wants to merge 2 commits into from

Conversation

mhmills
Copy link

@mhmills mhmills commented Apr 20, 2022

This pull request addresses issue #250 by accounting for names with common nicknames in the playerid_lookup() function. Previously, no data has been found when searching Yankees pitcher Michael King, but his data appeared under the name Mike King. This change accounts for that and other common nicknames -- for example somebody searching for Joe Votto would find the data for Joey Votto. I also added a test case for this in test_playerid_lookup.py.

Additionally, I updated pybaseball.__init__.py to match the changes made in pull request #251 (and that pull request should close issue #254); it was causing an ImportError for trying to import teams_core. The teams() function was replaced by teams_core in __init__.py but not in lahman.py, so I changed teams_core back to teams in the __init__.py.

@mhmills mhmills closed this Jun 21, 2022
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

Successfully merging this pull request may close these issues.

1 participant