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

pitching_stats and batting_stats not returning all data #428

Open
quansta opened this issue Jun 14, 2024 · 3 comments
Open

pitching_stats and batting_stats not returning all data #428

quansta opened this issue Jun 14, 2024 · 3 comments

Comments

@quansta
Copy link

quansta commented Jun 14, 2024

using pitching_stats and batting_stats and the full set of players are not returned from this call

@bdilday
Copy link
Contributor

bdilday commented Jun 14, 2024

you may need to set qual=0? i.e. #410 (comment)

@quansta
Copy link
Author

quansta commented Jun 14, 2024

trying to get all the stats from 2023 for batters - using the below with explicitly specifying some that should be defaulted, including qual. it only returns about 150 rows.

pb.batting_stats(2023, end_season=None, league='all', qual=None)

@bdilday
Copy link
Contributor

bdilday commented Jun 15, 2024

I think None is not the same thing as 0 in this context. You have to set qual=0, example,

In [10]: batting_stats(2023, end_season=None, league='all', qual=None).loc[:, ["PA"]].describe()
Out[10]: 
               PA
count  134.000000
mean   609.395522
std     64.924829
min    502.000000
25%    554.000000
50%    611.000000
75%    660.750000
max    753.000000

In [11]: batting_stats(2023, end_season=None, league='all', qual=0).loc[:, ["PA"]].describe()
Out[11]: 
                PA
count  1457.000000
mean    126.358270
std     201.427445
min       0.000000
25%       0.000000
50%       0.000000
75%     197.000000
max     753.000000

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