pybaseball
pybaseball copied to clipboard
Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
usese the curl_cffi requests instead of requests. This will help avoid cloudflare checks on requests, and impersonates the chrome request methods. This fixes issue 470
I am receiving the following error when I try to use the team_batting, team_pitching and team_fielding functions within pybaseball - does anyone know how to fix this? Error accessing 'https://www.fangraphs.com/leaders-legacy.aspx'....
Add functionality to get active 40-man roster for a given team. Depends on #471 so should be merged after that.
Add function that queries bref's MLB-schedule.shtml page. Takes a date and returns the list of games to be played or already played on that day, if any. Hits the schedule...
The schedule_and_record function is returning a ValueError when attempting to retrieve data for valid team and year combinations. The error message suggests that the team abbreviation or season may be...
I think that the stats range is broken. Any combination of dates I put in comes back blank.
As my title states, I can only pull data after the game has concluded. I'd like to view this data as the game is progressing along.. Here is a snippet...
Add logic that queries bref appearances and returns in a dataframe. Query by season or the current / most recent season by default. Hits the main Player Appearances table at...
## Fix pandas concat deprecation FutureWarning This PR removes a FutureWarning in pybaseball/datahelpers/postprocessing.py related to the use of `errors='ignore'` in pd.to_datetime, which is being deprecated. ### Changes: - Require non-empty...
## Fix pandas to_datetime deprecation warning This PR removes a FutureWarning in pybaseball/datahelpers/postprocessing.py related to the use of `errors='ignore'` in pd.to_datetime, which is being deprecated. ### Changes: - Wrapped call...