Giter Club home page Giter Club logo

Comments (3)

toddrob99 avatar toddrob99 commented on May 29, 2024

It looks like Yefry Ramirez was a pitcher of record in that game, but did not throw any pitches. Rather than including pitchesThrown with a value of 0, the API is leaving that field out. I will have to account for this scenario by using a default value of 0 when the field is missing from the API response.

from mlb-statsapi.

toddrob99 avatar toddrob99 commented on May 29, 2024

After fix, output from print(statsapi.boxscore(564949)):

------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
Angels Batters                           AB   R   H  RBI BB   K  LOB AVG   OPS  | Orioles Batters                          AB   R   H  RBI BB   K  LOB AVG   OPS
------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
1 La Stella  2B                           4   1   1   0   0   1   1  .255 .916  | 1 Villar  SS                              4   0   1   0   0   0   0  .256 .712
2 Trout  CF                               4   2   2   3   1   2   0  .283 1.027 | 2 Mancini  RF                             4   1   1   1   0   0   1  .326 .949
3 Ohtani  DH                              5   0   0   0   0   2   4  .125 .388  | 3 Smith Jr., D  LF                        4   0   0   0   0   2   0  .275 .793
4 Simmons  SS                             5   2   4   2   0   0   0  .308 .767  | 4 Ruiz, R  3B                             4   0   0   0   0   2   1  .239 .655
5 Goodwin  LF                             5   1   2   1   0   1   2  .318 .901  | 5 Wilkerson, S  CF                        4   1   1   0   0   2   1  .250 .687
6 Calhoun, K  RF                          4   0   2   2   1   0   3  .231 .825  | 6 Davis, C  1B                            3   1   2   2   1   0   0  .193 .647
7 Lucroy  C                               4   0   0   0   0   1   4  .266 .747  | 7 Núñez, R  DH                            4   0   0   0   0   2   3  .227 .658
8 Bour  1B                                3   1   0   0   1   0   1  .172 .613  | 8 Alberto  2B                             3   0   0   0   0   1   0  .283 .654
9 Fletcher  3B                            4   1   1   0   0   1   1  .308 .819  | 9 Severino, P  C                          3   0   0   0   0   0   0  .237 .783
------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
Totals                                   38   8  12   8   3   8  16             | Totals                                   33   3   5   3   1   9   6
------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
                                                                                |
BATTING                                                                         | BATTING
2B: Trout (8, Straily); Goodwin (7, Phillips, E); La Stella (2, Phillips, E).   | 2B: Wilkerson, S (3, Cahill).
3B: Calhoun, K (1, Straily).                                                    | HR: Mancini (7, 1st inning off Cahill, 0 on, 1 out); Davis, C (4, 7th inning
HR: Trout (8, 3rd inning off Straily, 1 on, 1 out).                             |     off Anderson, J, 0 on, 1 out).
TB: Calhoun, K 4; Fletcher; Goodwin 3; La Stella 2; Simmons 4; Trout 6.         | TB: Davis, C 5; Mancini 4; Villar; Wilkerson, S 2.
RBI: Calhoun, K 2 (23); Goodwin (13); Simmons 2 (21); Trout 3 (24).             | RBI: Davis, C 2 (16); Mancini (16).
2-out RBI: Calhoun, K; Simmons 2; Goodwin.                                      | 2-out RBI: Davis, C.
Runners left in scoring position, 2 out: Calhoun, K; Ohtani; Bour.              | Runners left in scoring position, 2 out: Mancini; Núñez, R.
GIDP: Lucroy.                                                                   | Team RISP: 1-for-3.
Team RISP: 3-for-8.                                                             | Team LOB: 4.
Team LOB: 7.                                                                    |
                                                                                | FIELDING
FIELDING                                                                        | DP: (Ruiz, R-Alberto-Davis, C).
E: Simmons (3, fielding).                                                       |
------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
Angels Pitchers                              IP   H   R  ER  BB   K  HR   ERA   | Orioles Pitchers                             IP   H   R  ER  BB   K  HR   ERA
------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
Cahill  (W, 2-3)                            6.0   4   2   2   0   5   1   6.35  | Straily  (L, 1-3)                           4.1   5   6   6   2   4   1   8.23
Anderson, J                                 1.0   1   1   1   0   2   1   3.65  | Phillips, E                                 1.2   4   2   2   1   1   0   7.11
García, L                                   1.0   0   0   0   0   0   0   2.40  | Ramírez, Y                                  0.0   0   0   0   0   0   0   5.14
Allen                                       1.0   0   0   0   1   2   0   6.55  | Castro, M                                   3.0   3   0   0   0   3   0   6.63
------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
Totals                                      9.0   5   3   3   1   9   2         | Totals                                      9.0  12   8   8   3   8   1
------------------------------------------------------------------------------- | -------------------------------------------------------------------------------
HBP: La Stella (by Straily).
Pitches-strikes: Cahill 78-52; Anderson, J 18-13; García, L 12-8; Allen 18-10; Straily 95-53; Phillips, E 36-22; Ramírez, Y 0-0; Castro, M 48-34.
Groundouts-flyouts: Cahill 8-1; Anderson, J 0-0; García, L 2-1; Allen 1-1; Straily 2-3; Phillips, E 4-0; Ramírez, Y 0-0; Castro, M 3-3.
Batters faced: Cahill 22; Anderson, J 4; García, L 3; Allen 5; Straily 20; Phillips, E 10; Castro, M 12.
Inherited runners-scored: Phillips, E 2-2.
Umpires: HP: Tom Hallion. 1B: Adam Hamari. 2B: Nick Mahrley. 3B: Todd Tichenor.
Weather: 73 degrees, Overcast.
Wind: 6 mph, Out To CF.
First pitch: 7:08 PM.
T: 3:04 (1:49 delay).
Att: 14,495.
Venue: Oriole Park at Camden Yards.
May 10, 2019
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

from mlb-statsapi.

toddrob99 avatar toddrob99 commented on May 29, 2024

Fixed in v1.4.1

py -m pip install --upgrade mlb-statsapi

from mlb-statsapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.