Comments (12)
I am also experiencing the same issue.
from pybaseball.
Agreed, same issue arises for me. Any ideas on alternative way to receive player key_mlbam?
from pybaseball.
@DannyPhant8m - I'm pulling key_mlbam from the statcast (batter/pitcher) and baseball reference (mlbID) data
from pybaseball.
@DannyPhant8m - I'm pulling key_mlbam from the statcast (batter/pitcher) and baseball reference (mlbID) data
The statcast function provides both batter and pitcher key_mlbam, but the player_name column only tells you the pitcher. How do you know which batter correlates to the batter key_mlbam?
from pybaseball.
getting the same error with the chadwick_register. guessing it's all related.
from pybaseball import chadwick_register
--get the register data and save to disk
chadwick_data = chadwick_register(save=True)
from pybaseball.
https://github.com/chadwickbureau/register
It seems that reference file is seperated.
people.csv, referenced by chadwick_register(), was split into 16 files, people-[0-f].csv .
from pybaseball.
https://github.com/chadwickbureau/register
It seems that reference file is seperated. people.csv, referenced by chadwick_register(), was split into 16 files, people-[0-f].csv .
Exactly that. The PyBaseball team will need time to reflect changes in their function more than likely. Until then you'll need to write your own to reflect the change that's been made upstream from chadwickbureau.
from pybaseball.
@DannyPhant8m - I'm pulling key_mlbam from the statcast (batter/pitcher) and baseball reference (mlbID) data
The statcast function provides both batter and pitcher key_mlbam, but the player_name column only tells you the pitcher. How do you know which batter correlates to the batter key_mlbam?
@DannyPhant8m - I'm pulling key_mlbam from the statcast (batter/pitcher) and baseball reference (mlbID) data
The statcast function provides both batter and pitcher key_mlbam, but the player_name column only tells you the pitcher. How do you know which batter correlates to the batter key_mlbam?
@DannyPhant8m - I'm using bwar_pitch() to hack a join table
from pybaseball.
I've worked up a temporary fix that is working for me. Simply adjust the player_lookup.py file in the pybaseball folder as follows:
from pybaseball.
Confirming this works after #309:
>>> data = playerid_reverse_lookup(player_ids, key_type='mlbam')
>>> data
name_last name_first key_mlbam key_retro key_bbref key_fangraphs mlb_played_first mlb_played_last
0 jeter shawn 116541 jetes001 jetersh01 1006406 1992.0 1992.0
1 jeter derek 116539 jeted001 jeterde01 826 1995.0 2014.0
2 jeter johnny 116540 jetej101 jeterjo01 1006405 1969.0 1974.0
The forward lookup throws a bunch of warnings now but I'll open a new issue for that.
from pybaseball.
@tjburch, your above comment still does not work for me at the moment
from pybaseball.
There hasn't been a new release yet so it's not on PyPi. Install the library directly from git, not pip.
from pybaseball.
Related Issues (20)
- PyBaseball module not found in JupyterLab notebook HOT 5
- [feature] Scrape the yearly rookies page HOT 15
- list index out of range error for calling pitching_stats_range
- season_game_logs() from retrosheet.py returns error for all seasons HOT 1
- schedule_and_record doesn't work for any year/team combo HOT 4
- Pulling Park Factors from baseball savant
- pitching_stats(year) not working for some seasons HOT 2
- statcast_pitcher does not apply sanitize_input
- retrosheet.py returns an error for all functions HOT 1
- team_game_logs not pulling HOT 2
- Statcast Ball Counts > 3
- How to Get a Pitcher's Season-to-Date ERA heading into a specific date/game_pk?
- Minor League Statcast data
- Future Warnings in team_game_logs
- pitching_stats_range - occasionally not working
- Convert dtypes issue? HOT 2
- pitching_stats and batting_stats not returning all data HOT 3
- Imports HOT 6
- Missing cLI data interferes with streak calculation
- Shota Imanaga key_fangraphs value -1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pybaseball.