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.
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 intest_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 toimport teams_core
. Theteams()
function was replaced byteams_core
in__init__.py
but not inlahman.py
, so I changedteams_core
back toteams
in the__init__.py
.