Executing Basic DataFrame Transformations in PySpark

If you joined us last time, you should have some working knowledge of how to get started with PySpark by using a Databricks notebook. Armed with that knowledge, we can now start playing with real data.

For most of the time we spend in PySpark, we'll likely be working with Spark DataFrames: this is our bread and butter for data manipulation in Spark. For this exercise, we'll attempt to execute an elementary string of transformations to get a feel for what the middle portion of an ETL pipeline looks like (also known as the "transform" part 😁).

Loading Up Some Data

As usual, I'll be loading up some sample data from our best friend, Google BigQuery. The example data I'll be using is a public dataset from BigQuery: the results of the MLB 2016 postseason:

Executing Basic DataFrame Transformations in PySpark
Baseball games from BigQuery.

We'll export this data to a CSV. Next, we'll import this data into Databricks the same way as last time. Now we can get started messing with data.

Simple Data Transformations

First things first, we need to load this data into a DataFrame:

# File location and type
file_location = "/FileStore/tables/results_20190428_181010-cc606.csv"
file_type = "csv"

# CSV options
infer_schema = "true"
first_row_is_header = "true"
delimiter = ","

# The applied options are for CSV files. For other file types, these will be ignored.
df = spark.read.format(file_type) \
  .option("inferSchema", infer_schema) \
  .option("header", first_row_is_header) \
  .option("sep", delimiter) \
  .load(file_location)

display(df)

Nothing new so far! Before going any further, we need to decide what we actually need to do with this data (hopefully this is the first thing we do under normal circumstances)! Let's get a quick look at what we're working with, by using print(df.info()):

root
 |-- gameId: string (nullable = true)
 |-- seasonId: string (nullable = true)
 |-- seasonType: string (nullable = true)
 |-- year: integer (nullable = true)
 |-- startTime: string (nullable = true)
 |-- gameStatus: string (nullable = true)
 |-- attendance: integer (nullable = true)
 |-- dayNight: string (nullable = true)
 |-- duration: string (nullable = true)
 |-- durationMinutes: integer (nullable = true)
 |-- awayTeamId: string (nullable = true)
 |-- awayTeamName: string (nullable = true)
 |-- homeTeamId: string (nullable = true)
 |-- homeTeamName: string (nullable = true)
 |-- venueId: string (nullable = true)
 |-- venueName: string (nullable = true)
 |-- venueSurface: string (nullable = true)
 |-- venueCapacity: integer (nullable = true)
 |-- venueCity: string (nullable = true)
 |-- venueState: string (nullable = true)
 |-- venueZip: integer (nullable = true)
 |-- venueMarket: string (nullable = true)
 |-- venueOutfieldDistances: string (nullable = true)
 |-- homeFinalRuns: integer (nullable = true)
 |-- homeFinalHits: integer (nullable = true)
 |-- homeFinalErrors: integer (nullable = true)
 |-- awayFinalRuns: integer (nullable = true)
 |-- awayFinalHits: integer (nullable = true)
 |-- awayFinalErrors: integer (nullable = true)
 |-- homeFinalRunsForInning: integer (nullable = true)
 |-- awayFinalRunsForInning: integer (nullable = true)
 |-- inningNumber: integer (nullable = true)
 |-- inningHalf: string (nullable = true)
 |-- inningEventType: string (nullable = true)
 |-- inningHalfEventSequenceNumber: integer (nullable = true)
 |-- description: string (nullable = true)
 |-- atBatEventType: string (nullable = true)
 |-- atBatEventSequenceNumber: integer (nullable = true)
 |-- createdAt: string (nullable = true)
 |-- updatedAt: string (nullable = true)
 |-- status: string (nullable = true)
 |-- outcomeId: string (nullable = true)
 |-- outcomeDescription: string (nullable = true)
 |-- hitterId: string (nullable = true)
 |-- hitterLastName: string (nullable = true)
 |-- hitterFirstName: string (nullable = true)
 |-- hitterWeight: integer (nullable = true)
 |-- hitterHeight: integer (nullable = true)
 |-- hitterBatHand: string (nullable = true)
 |-- pitcherId: string (nullable = true)
 |-- pitcherFirstName: string (nullable = true)
 |-- pitcherLastName: string (nullable = true)
 |-- pitcherThrowHand: string (nullable = true)
 |-- pitchType: string (nullable = true)
 |-- pitchTypeDescription: string (nullable = true)
 |-- pitchSpeed: integer (nullable = true)
 |-- pitchZone: integer (nullable = true)
 |-- pitcherPitchCount: integer (nullable = true)
 |-- hitterPitchCount: integer (nullable = true)
 |-- hitLocation: integer (nullable = true)
 |-- hitType: string (nullable = true)
 |-- startingBalls: integer (nullable = true)
 |-- startingStrikes: integer (nullable = true)
 |-- startingOuts: integer (nullable = true)
 |-- balls: integer (nullable = true)
 |-- strikes: integer (nullable = true)
 |-- outs: integer (nullable = true)
 |-- rob0_start: string (nullable = true)
 |-- rob0_end: integer (nullable = true)
 |-- rob0_isOut: string (nullable = true)
 |-- rob0_outcomeId: string (nullable = true)
 |-- rob0_outcomeDescription: string (nullable = true)
 |-- rob1_start: string (nullable = true)
 |-- rob1_end: integer (nullable = true)
 |-- rob1_isOut: string (nullable = true)
 |-- rob1_outcomeId: string (nullable = true)
 |-- rob1_outcomeDescription: string (nullable = true)
 |-- rob2_start: string (nullable = true)
 |-- rob2_end: integer (nullable = true)
 |-- rob2_isOut: string (nullable = true)
 |-- rob2_outcomeId: string (nullable = true)
 |-- rob2_outcomeDescription: string (nullable = true)
 |-- rob3_start: string (nullable = true)
 |-- rob3_end: integer (nullable = true)
 |-- rob3_isOut: string (nullable = true)
 |-- rob3_outcomeId: string (nullable = true)
 |-- rob3_outcomeDescription: string (nullable = true)
 |-- is_ab: integer (nullable = true)
 |-- is_ab_over: integer (nullable = true)
 |-- is_hit: integer (nullable = true)
 |-- is_on_base: integer (nullable = true)
 |-- is_bunt: integer (nullable = true)
 |-- is_bunt_shown: integer (nullable = true)
 |-- is_double_play: integer (nullable = true)
 |-- is_triple_play: integer (nullable = true)
 |-- is_wild_pitch: integer (nullable = true)
 |-- is_passed_ball: integer (nullable = true)
 |-- homeCurrentTotalRuns: integer (nullable = true)
 |-- awayCurrentTotalRuns: integer (nullable = true)
 |-- awayFielder1: string (nullable = true)
 |-- awayFielder2: string (nullable = true)
 |-- awayFielder3: string (nullable = true)
 |-- awayFielder4: string (nullable = true)
 |-- awayFielder5: string (nullable = true)
 |-- awayFielder6: string (nullable = true)
 |-- awayFielder7: string (nullable = true)
 |-- awayFielder8: string (nullable = true)
 |-- awayFielder9: string (nullable = true)
 |-- awayFielder10: string (nullable = true)
 |-- awayFielder11: string (nullable = true)
 |-- awayFielder12: string (nullable = true)
 |-- awayBatter1: string (nullable = true)
 |-- awayBatter2: string (nullable = true)
 |-- awayBatter3: string (nullable = true)
 |-- awayBatter4: string (nullable = true)
 |-- awayBatter5: string (nullable = true)
 |-- awayBatter6: string (nullable = true)
 |-- awayBatter7: string (nullable = true)
 |-- awayBatter8: string (nullable = true)
 |-- awayBatter9: string (nullable = true)
 |-- homeFielder1: string (nullable = true)
 |-- homeFielder2: string (nullable = true)
 |-- homeFielder3: string (nullable = true)
 |-- homeFielder4: string (nullable = true)
 |-- homeFielder5: string (nullable = true)
 |-- homeFielder6: string (nullable = true)
 |-- homeFielder7: string (nullable = true)
 |-- homeFielder8: string (nullable = true)
 |-- homeFielder9: string (nullable = true)
 |-- homeFielder10: string (nullable = true)
 |-- homeFielder11: string (nullable = true)
 |-- homeFielder12: string (nullable = true)
 |-- homeBatter1: string (nullable = true)
 |-- homeBatter2: string (nullable = true)
 |-- homeBatter3: string (nullable = true)
 |-- homeBatter4: string (nullable = true)
 |-- homeBatter5: string (nullable = true)
 |-- homeBatter6: string (nullable = true)
 |-- homeBatter7: string (nullable = true)
 |-- homeBatter8: string (nullable = true)
 |-- homeBatter9: string (nullable = true)
 |-- lineupTeamId: string (nullable = true)
 |-- lineupPlayerId: string (nullable = true)
 |-- lineupPosition: integer (nullable = true)
 |-- lineupOrder: integer (nullable = true)

Holy hell, that's a lot of columns! Let's see what exactly these columns are doing with display(df):

gameId seasonId seasonType year startTime gameStatus attendance dayNight duration durationMinutes awayTeamId awayTeamName homeTeamId homeTeamName venueId venueName venueSurface venueCapacity venueCity venueState venueZip venueMarket venueOutfieldDistances homeFinalRuns homeFinalHits homeFinalErrors awayFinalRuns awayFinalHits awayFinalErrors homeFinalRunsForInning awayFinalRunsForInning inningNumber inningHalf inningEventType inningHalfEventSequenceNumber description atBatEventType atBatEventSequenceNumber createdAt updatedAt status outcomeId outcomeDescription hitterId hitterLastName hitterFirstName hitterWeight hitterHeight hitterBatHand pitcherId pitcherFirstName pitcherLastName pitcherThrowHand pitchType pitchTypeDescription pitchSpeed pitchZone pitcherPitchCount hitterPitchCount hitLocation hitType startingBalls startingStrikes startingOuts balls strikes outs rob0_start rob0_end rob0_isOut rob0_outcomeId rob0_outcomeDescription rob1_start rob1_end rob1_isOut rob1_outcomeId rob1_outcomeDescription rob2_start rob2_end rob2_isOut rob2_outcomeId rob2_outcomeDescription rob3_start rob3_end rob3_isOut rob3_outcomeId rob3_outcomeDescription is_ab is_ab_over is_hit is_on_base is_bunt is_bunt_shown is_double_play is_triple_play is_wild_pitch is_passed_ball homeCurrentTotalRuns awayCurrentTotalRuns awayFielder1 awayFielder2 awayFielder3 awayFielder4 awayFielder5 awayFielder6 awayFielder7 awayFielder8 awayFielder9 awayFielder10 awayFielder11 awayFielder12 awayBatter1 awayBatter2 awayBatter3 awayBatter4 awayBatter5 awayBatter6 awayBatter7 awayBatter8 awayBatter9 homeFielder1 homeFielder2 homeFielder3 homeFielder4 homeFielder5 homeFielder6 homeFielder7 homeFielder8 homeFielder9 homeFielder10 homeFielder11 homeFielder12 homeBatter1 homeBatter2 homeBatter3 homeBatter4 homeBatter5 homeBatter6 homeBatter7 homeBatter8 homeBatter9 lineupTeamId lineupPlayerId lineupPosition lineupOrder
dc42dfe7-d6dd-4831-a9ad-c1dcfc8f62af 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-05-11 19:10:00 UTC closed 34890 D 3:19 199 25507be1-6a68-4267-bd82-e097d94b359b Diamondbacks 29dd9a87-5bcc-4774-80c3-7f50d985068b Rockies 85dd5cd6-7324-4b52-a1cc-68f816d0cdce Coors Field grass 50398 Denver CO 80205 Colorado mrf-365:mlcf-397:cf-415:rcf-375:rf-350:mlf-361:lf-347:mrcf-391:lcf-390 8 14 0 7 13 1 1 3 8 TOP AT_BAT 3 Yasmany Tomas doubles to deep center field. Paul Goldschmidt scores. PITCH 1 2016-05-11 21:53:30 UTC 2016-05-11 21:53:36 UTC official kF Foul Ball 5fb27d81-527a-4e98-b0f3-efdc52f974c8 Tomas Yasmany 255 74 R 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a Chad Qualls R SL Slider 82 4 1 1 0 0 0 1 0 1 1 0 false 0 false 0 false 7c9c97fd-7a89-49e1-830b-0274a5c2209a 3 false 0 0 0 0 0 0 0 0 0 0 7 4 7fad31e2-edbb-48b6-b439-9a016e0d9657 63df7794-746c-4869-8e54-0addccbb376f 7c9c97fd-7a89-49e1-830b-0274a5c2209a 6d49ed69-4365-48d7-904c-f7431641f67c 35a3e757-618f-4f85-a80f-9f717bec806d 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 3e39fe20-6dca-4894-807b-1ce76ff93e29 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 6d49ed69-4365-48d7-904c-f7431641f67c 7fad31e2-edbb-48b6-b439-9a016e0d9657 7c9c97fd-7a89-49e1-830b-0274a5c2209a 35a3e757-618f-4f85-a80f-9f717bec806d 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 63df7794-746c-4869-8e54-0addccbb376f 3e39fe20-6dca-4894-807b-1ce76ff93e29 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a 96da1d70-153b-4783-999a-858ef2c5c508 d0f4c8f6-1d2a-456d-b292-16e37231e738 d1c07b01-a86d-4c17-ac38-8217e364c2cf aec77ff1-c238-449c-9af6-ed76ff9dd702 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c e7b98206-956a-4409-9f22-64f2048a31ee 6d5ea773-5f3d-470e-b572-b59fc278f892 5fec650f-de86-43d2-9efb-32af34a4d5a4 6d5ea773-5f3d-470e-b572-b59fc278f892 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c aec77ff1-c238-449c-9af6-ed76ff9dd702 d0f4c8f6-1d2a-456d-b292-16e37231e738 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a d1c07b01-a86d-4c17-ac38-8217e364c2cf e7b98206-956a-4409-9f22-64f2048a31ee 96da1d70-153b-4783-999a-858ef2c5c508 5fec650f-de86-43d2-9efb-32af34a4d5a4 0 0
dc42dfe7-d6dd-4831-a9ad-c1dcfc8f62af 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-05-11 19:10:00 UTC closed 34890 D 3:19 199 25507be1-6a68-4267-bd82-e097d94b359b Diamondbacks 29dd9a87-5bcc-4774-80c3-7f50d985068b Rockies 85dd5cd6-7324-4b52-a1cc-68f816d0cdce Coors Field grass 50398 Denver CO 80205 Colorado mrf-365:mlcf-397:cf-415:rcf-375:rf-350:mlf-361:lf-347:mrcf-391:lcf-390 8 14 0 7 13 1 1 3 8 TOP AT_BAT 3 Yasmany Tomas doubles to deep center field. Paul Goldschmidt scores. PITCH 3 2016-05-11 21:54:27 UTC 2016-05-11 21:54:31 UTC official aD Double 5fb27d81-527a-4e98-b0f3-efdc52f974c8 Tomas Yasmany 255 74 R 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a Chad Qualls R SL Slider 82 8 3 3 8 1 1 1 1 1 1 5fb27d81-527a-4e98-b0f3-efdc52f974c8 2 false AD2 0 false 0 false 7c9c97fd-7a89-49e1-830b-0274a5c2209a 4 false ERN Paul Goldschmidt scores. 1 1 1 1 0 0 0 0 0 0 7 5 7fad31e2-edbb-48b6-b439-9a016e0d9657 63df7794-746c-4869-8e54-0addccbb376f 7c9c97fd-7a89-49e1-830b-0274a5c2209a 6d49ed69-4365-48d7-904c-f7431641f67c 35a3e757-618f-4f85-a80f-9f717bec806d 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 3e39fe20-6dca-4894-807b-1ce76ff93e29 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 6d49ed69-4365-48d7-904c-f7431641f67c 7fad31e2-edbb-48b6-b439-9a016e0d9657 7c9c97fd-7a89-49e1-830b-0274a5c2209a 35a3e757-618f-4f85-a80f-9f717bec806d 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 63df7794-746c-4869-8e54-0addccbb376f 3e39fe20-6dca-4894-807b-1ce76ff93e29 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a 96da1d70-153b-4783-999a-858ef2c5c508 d0f4c8f6-1d2a-456d-b292-16e37231e738 d1c07b01-a86d-4c17-ac38-8217e364c2cf aec77ff1-c238-449c-9af6-ed76ff9dd702 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c e7b98206-956a-4409-9f22-64f2048a31ee 6d5ea773-5f3d-470e-b572-b59fc278f892 5fec650f-de86-43d2-9efb-32af34a4d5a4 6d5ea773-5f3d-470e-b572-b59fc278f892 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c aec77ff1-c238-449c-9af6-ed76ff9dd702 d0f4c8f6-1d2a-456d-b292-16e37231e738 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a d1c07b01-a86d-4c17-ac38-8217e364c2cf e7b98206-956a-4409-9f22-64f2048a31ee 96da1d70-153b-4783-999a-858ef2c5c508 5fec650f-de86-43d2-9efb-32af34a4d5a4 0 0
dc42dfe7-d6dd-4831-a9ad-c1dcfc8f62af 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-05-11 19:10:00 UTC closed 34890 D 3:19 199 25507be1-6a68-4267-bd82-e097d94b359b Diamondbacks 29dd9a87-5bcc-4774-80c3-7f50d985068b Rockies 85dd5cd6-7324-4b52-a1cc-68f816d0cdce Coors Field grass 50398 Denver CO 80205 Colorado mrf-365:mlcf-397:cf-415:rcf-375:rf-350:mlf-361:lf-347:mrcf-391:lcf-390 8 14 0 7 13 1 1 3 8 TOP AT_BAT 6 Chris Owings singles to second base. Chris Herrmann scores. PITCH 2 2016-05-11 21:58:52 UTC 2016-05-11 21:58:58 UTC official aS Single 3e39fe20-6dca-4894-807b-1ce76ff93e29 Owings Christopher 190 70 R 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a Chad Qualls R SI Sinker 91 4 10 2 23 1 0 2 1 0 2 3e39fe20-6dca-4894-807b-1ce76ff93e29 1 false AD1 0 false 0 false 63df7794-746c-4869-8e54-0addccbb376f 4 false ERN Chris Herrmann scores. 1 1 1 1 0 0 0 0 0 0 7 7 7fad31e2-edbb-48b6-b439-9a016e0d9657 63df7794-746c-4869-8e54-0addccbb376f 7c9c97fd-7a89-49e1-830b-0274a5c2209a 6d49ed69-4365-48d7-904c-f7431641f67c 35a3e757-618f-4f85-a80f-9f717bec806d 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 3e39fe20-6dca-4894-807b-1ce76ff93e29 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 6d49ed69-4365-48d7-904c-f7431641f67c 7fad31e2-edbb-48b6-b439-9a016e0d9657 7c9c97fd-7a89-49e1-830b-0274a5c2209a 35a3e757-618f-4f85-a80f-9f717bec806d 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 63df7794-746c-4869-8e54-0addccbb376f 3e39fe20-6dca-4894-807b-1ce76ff93e29 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a 96da1d70-153b-4783-999a-858ef2c5c508 d0f4c8f6-1d2a-456d-b292-16e37231e738 d1c07b01-a86d-4c17-ac38-8217e364c2cf aec77ff1-c238-449c-9af6-ed76ff9dd702 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c e7b98206-956a-4409-9f22-64f2048a31ee 6d5ea773-5f3d-470e-b572-b59fc278f892 5fec650f-de86-43d2-9efb-32af34a4d5a4 6d5ea773-5f3d-470e-b572-b59fc278f892 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c aec77ff1-c238-449c-9af6-ed76ff9dd702 d0f4c8f6-1d2a-456d-b292-16e37231e738 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a d1c07b01-a86d-4c17-ac38-8217e364c2cf e7b98206-956a-4409-9f22-64f2048a31ee 96da1d70-153b-4783-999a-858ef2c5c508 5fec650f-de86-43d2-9efb-32af34a4d5a4 0 0
dc42dfe7-d6dd-4831-a9ad-c1dcfc8f62af 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-05-11 19:10:00 UTC closed 34890 D 3:19 199 25507be1-6a68-4267-bd82-e097d94b359b Diamondbacks 29dd9a87-5bcc-4774-80c3-7f50d985068b Rockies 85dd5cd6-7324-4b52-a1cc-68f816d0cdce Coors Field grass 50398 Denver CO 80205 Colorado mrf-365:mlcf-397:cf-415:rcf-375:rf-350:mlf-361:lf-347:mrcf-391:lcf-390 8 14 0 7 13 1 1 3 8 TOP AT_BAT 5 Chris Herrmann triples to deep center field. Yasmany Tomas scores. PITCH 2 2016-05-11 21:57:37 UTC 2016-05-11 21:57:55 UTC official aT Triple 63df7794-746c-4869-8e54-0addccbb376f Herrmann Christopher 200 72 L 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a Chad Qualls R SI Sinker 91 8 8 2 8 0 1 2 0 1 2 63df7794-746c-4869-8e54-0addccbb376f 3 false AD3 0 false 0 false 5fb27d81-527a-4e98-b0f3-efdc52f974c8 4 false ERN Yasmany Tomas scores. 1 1 1 1 0 0 0 0 0 0 7 6 7fad31e2-edbb-48b6-b439-9a016e0d9657 63df7794-746c-4869-8e54-0addccbb376f 7c9c97fd-7a89-49e1-830b-0274a5c2209a 6d49ed69-4365-48d7-904c-f7431641f67c 35a3e757-618f-4f85-a80f-9f717bec806d 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 3e39fe20-6dca-4894-807b-1ce76ff93e29 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 6d49ed69-4365-48d7-904c-f7431641f67c 7fad31e2-edbb-48b6-b439-9a016e0d9657 7c9c97fd-7a89-49e1-830b-0274a5c2209a 35a3e757-618f-4f85-a80f-9f717bec806d 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 63df7794-746c-4869-8e54-0addccbb376f 3e39fe20-6dca-4894-807b-1ce76ff93e29 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a 96da1d70-153b-4783-999a-858ef2c5c508 d0f4c8f6-1d2a-456d-b292-16e37231e738 d1c07b01-a86d-4c17-ac38-8217e364c2cf aec77ff1-c238-449c-9af6-ed76ff9dd702 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c e7b98206-956a-4409-9f22-64f2048a31ee 6d5ea773-5f3d-470e-b572-b59fc278f892 5fec650f-de86-43d2-9efb-32af34a4d5a4 6d5ea773-5f3d-470e-b572-b59fc278f892 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c aec77ff1-c238-449c-9af6-ed76ff9dd702 d0f4c8f6-1d2a-456d-b292-16e37231e738 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a d1c07b01-a86d-4c17-ac38-8217e364c2cf e7b98206-956a-4409-9f22-64f2048a31ee 96da1d70-153b-4783-999a-858ef2c5c508 5fec650f-de86-43d2-9efb-32af34a4d5a4 0 0
dc42dfe7-d6dd-4831-a9ad-c1dcfc8f62af 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-05-11 19:10:00 UTC closed 34890 D 3:19 199 25507be1-6a68-4267-bd82-e097d94b359b Diamondbacks 29dd9a87-5bcc-4774-80c3-7f50d985068b Rockies 85dd5cd6-7324-4b52-a1cc-68f816d0cdce Coors Field grass 50398 Denver CO 80205 Colorado mrf-365:mlcf-397:cf-415:rcf-375:rf-350:mlf-361:lf-347:mrcf-391:lcf-390 8 14 0 7 13 1 1 3 8 TOP AT_BAT 5 Chris Herrmann triples to deep center field. Yasmany Tomas scores. PITCH 1 2016-05-11 21:56:59 UTC 2016-05-11 21:57:04 UTC official kKS Strike Swinging 63df7794-746c-4869-8e54-0addccbb376f Herrmann Christopher 200 72 L 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a Chad Qualls R SI Sinker 90 6 7 1 0 0 0 2 0 1 2 0 false 0 false 0 false 5fb27d81-527a-4e98-b0f3-efdc52f974c8 3 false 0 0 0 0 0 0 0 0 0 0 7 5 7fad31e2-edbb-48b6-b439-9a016e0d9657 63df7794-746c-4869-8e54-0addccbb376f 7c9c97fd-7a89-49e1-830b-0274a5c2209a 6d49ed69-4365-48d7-904c-f7431641f67c 35a3e757-618f-4f85-a80f-9f717bec806d 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 3e39fe20-6dca-4894-807b-1ce76ff93e29 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 6d49ed69-4365-48d7-904c-f7431641f67c 7fad31e2-edbb-48b6-b439-9a016e0d9657 7c9c97fd-7a89-49e1-830b-0274a5c2209a 35a3e757-618f-4f85-a80f-9f717bec806d 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 63df7794-746c-4869-8e54-0addccbb376f 3e39fe20-6dca-4894-807b-1ce76ff93e29 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a 96da1d70-153b-4783-999a-858ef2c5c508 d0f4c8f6-1d2a-456d-b292-16e37231e738 d1c07b01-a86d-4c17-ac38-8217e364c2cf aec77ff1-c238-449c-9af6-ed76ff9dd702 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c e7b98206-956a-4409-9f22-64f2048a31ee 6d5ea773-5f3d-470e-b572-b59fc278f892 5fec650f-de86-43d2-9efb-32af34a4d5a4 6d5ea773-5f3d-470e-b572-b59fc278f892 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c aec77ff1-c238-449c-9af6-ed76ff9dd702 d0f4c8f6-1d2a-456d-b292-16e37231e738 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a d1c07b01-a86d-4c17-ac38-8217e364c2cf e7b98206-956a-4409-9f22-64f2048a31ee 96da1d70-153b-4783-999a-858ef2c5c508 5fec650f-de86-43d2-9efb-32af34a4d5a4 0 0
dc42dfe7-d6dd-4831-a9ad-c1dcfc8f62af 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-05-11 19:10:00 UTC closed 34890 D 3:19 199 25507be1-6a68-4267-bd82-e097d94b359b Diamondbacks 29dd9a87-5bcc-4774-80c3-7f50d985068b Rockies 85dd5cd6-7324-4b52-a1cc-68f816d0cdce Coors Field grass 50398 Denver CO 80205 Colorado mrf-365:mlcf-397:cf-415:rcf-375:rf-350:mlf-361:lf-347:mrcf-391:lcf-390 8 14 0 7 13 1 1 3 8 TOP AT_BAT 4 Rickie Weeks flies out to deep center field to Charlie Blackmon. Yasmany Tomas to third. PITCH 2 2016-05-11 21:55:28 UTC 2016-05-11 21:55:33 UTC official kF Foul Ball e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 Weeks Rickie 220 70 R 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a Chad Qualls R SI Sinker 91 5 5 2 0 1 0 1 1 1 1 0 false 0 false 5fb27d81-527a-4e98-b0f3-efdc52f974c8 2 false 0 false 0 0 0 0 0 0 0 0 0 0 7 5 7fad31e2-edbb-48b6-b439-9a016e0d9657 63df7794-746c-4869-8e54-0addccbb376f 7c9c97fd-7a89-49e1-830b-0274a5c2209a 6d49ed69-4365-48d7-904c-f7431641f67c 35a3e757-618f-4f85-a80f-9f717bec806d 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 3e39fe20-6dca-4894-807b-1ce76ff93e29 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 6d49ed69-4365-48d7-904c-f7431641f67c 7fad31e2-edbb-48b6-b439-9a016e0d9657 7c9c97fd-7a89-49e1-830b-0274a5c2209a 35a3e757-618f-4f85-a80f-9f717bec806d 5fb27d81-527a-4e98-b0f3-efdc52f974c8 e9fb4d0d-d785-4a16-aac4-ab68bbe3e2f5 63df7794-746c-4869-8e54-0addccbb376f 3e39fe20-6dca-4894-807b-1ce76ff93e29 43944ff4-dec0-4f37-8c8c-fe71123d5cd7 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a 96da1d70-153b-4783-999a-858ef2c5c508 d0f4c8f6-1d2a-456d-b292-16e37231e738 d1c07b01-a86d-4c17-ac38-8217e364c2cf aec77ff1-c238-449c-9af6-ed76ff9dd702 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c e7b98206-956a-4409-9f22-64f2048a31ee 6d5ea773-5f3d-470e-b572-b59fc278f892 5fec650f-de86-43d2-9efb-32af34a4d5a4 6d5ea773-5f3d-470e-b572-b59fc278f892 f8ab2aa3-26ce-447c-9db5-83ea5f13da0c aec77ff1-c238-449c-9af6-ed76ff9dd702 d0f4c8f6-1d2a-456d-b292-16e37231e738 0081ffb9-e0d7-4e7f-9adf-d6b36cbb959a d1c07b01-a86d-4c17-ac38-8217e364c2cf e7b98206-956a-4409-9f22-64f2048a31ee 96da1d70-153b-4783-999a-858ef2c5c508 5fec650f-de86-43d2-9efb-32af34a4d5a4 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 0 2 1 BOT AT_BAT 4 Brad Miller grounds out to first base to Edwin Encarnacion. PITCH 1 2016-09-02 23:31:29 UTC 2016-09-02 23:32:05 UTC official kF Foul Ball a85e4cd0-03e0-4761-9e77-31a14fd8af33 Miller Bradley 200 74 L cc86d4d3-1618-415e-b7fc-a303f3b8dd6f Marcus Stroman R CT Cutter 90 7 12 1 0 0 0 2 0 1 2 0 false 0 false d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 2 false 0 false 0 0 0 0 0 0 0 0 0 0 0 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 d2c5e643-fe5d-4ece-8f1e-560d6b2048ed d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 1 0 2 TOP AT_BAT 3 STEAL 3 2016-09-02 23:41:15 UTC 2016-10-15 05:00:29 UTC official - SEE RUNNER(S) OUTCOME e6b6b905-a355-4e85-84ca-db655cc3dce4 Travis Devon 190 69 R d2c5e643-fe5d-4ece-8f1e-560d6b2048ed Alexander Cobb R 0 0 0 0 0 1 0 1 1 0 1 0 false 7335e54f-cc2f-422c-808e-c19a267827a5 1 false CK 0 false 0 false 0 0 0 0 0 0 0 0 0 0 0 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 d2c5e643-fe5d-4ece-8f1e-560d6b2048ed d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 1 0 2 TOP AT_BAT 4 STEAL 7 2016-09-02 23:44:53 UTC 2016-10-15 05:00:29 UTC official - SEE RUNNER(S) OUTCOME 78bbb2e3-487a-4f14-ad95-22dfae998a98 Bautista Jose 205 72 R d2c5e643-fe5d-4ece-8f1e-560d6b2048ed Alexander Cobb R 0 0 0 0 0 3 2 2 3 2 2 0 false e6b6b905-a355-4e85-84ca-db655cc3dce4 1 false CK 0 false 0 false 0 0 0 0 0 0 0 0 0 0 0 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 d2c5e643-fe5d-4ece-8f1e-560d6b2048ed d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 0 0 4 BOT AT_BAT 2 Nick Franklin strikes out swinging. PITCH 6 2016-09-03 00:29:30 UTC 2016-09-03 00:30:02 UTC official kKS Strike Swinging 87c484cc-e672-4a34-ab02-cc29101d8a52 Franklin Nicholas 195 73 B cc86d4d3-1618-415e-b7fc-a303f3b8dd6f Marcus Stroman R CT Cutter 87 12 63 6 0 3 2 1 3 3 2 0 false 0 false 0 false 0 false 1 1 0 0 0 0 0 0 0 0 2 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 d2c5e643-fe5d-4ece-8f1e-560d6b2048ed d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 2 0 6 BOT AT_BAT 3 Logan Morrison homers to center field. Matt Duffy scores. PITCH 1 2016-09-03 01:00:24 UTC 2016-09-03 01:02:19 UTC official aHR Homerun 5f4f9e11-f9b5-4221-95b6-13329553848d Morrison Logan 240 74 L cc86d4d3-1618-415e-b7fc-a303f3b8dd6f Marcus Stroman R FA Fastball 93 5 85 1 4 FB 0 0 1 0 0 1 5f4f9e11-f9b5-4221-95b6-13329553848d 4 false ERN 0 false 00856892-9a5a-4161-b979-4335dab399cc 4 false ERN Matt Duffy scores. 0 false 1 1 1 0 0 0 0 0 0 0 4 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 8e841e8a-ed03-45e9-b002-9189c005596b d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 4 0 7 TOP AT_BAT 3 Jose Bautista lines out to shallow center field to Logan Forsythe. PITCH 5 2016-09-03 01:11:45 UTC 2016-09-03 01:11:49 UTC official bB Ball 78bbb2e3-487a-4f14-ad95-22dfae998a98 Bautista Jose 205 72 R 14a7138b-b12b-4dbf-a561-e715cd0491db Kevin Jepsen R CU Curveball 82 13 13 5 0 1 2 2 2 2 2 0 false 0 false 0 false 0 false 0 0 0 0 0 0 0 0 0 0 4 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 14a7138b-b12b-4dbf-a561-e715cd0491db d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 4 0 7 BOT AT_BAT 3 Kevin Kiermaier triples to deep right center field. Logan Forsythe scores. PITCH 3 2016-09-03 01:19:51 UTC 2016-09-03 01:20:56 UTC official bDB Dirt Ball 908cf3f8-d7a4-4346-b39e-1f4f66a21864 Kiermaier Kevin 215 73 L ef6e13f3-c4c7-4233-b098-356f73e50d39 Francisco Liriano L FA Fastball 88 12 15 2 0 0 1 0 1 1 0 0 false d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 1 false 0 false 0 false 0 0 0 0 0 0 0 0 0 0 5 2 ef6e13f3-c4c7-4233-b098-356f73e50d39 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 14a7138b-b12b-4dbf-a561-e715cd0491db d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 1 0 2 BOT AT_BAT 3 Nick Franklin doubles to deep right field. Logan Morrison to third. PITCH 1 2016-09-02 23:55:18 UTC 2016-09-02 23:55:27 UTC official bB Ball 87c484cc-e672-4a34-ab02-cc29101d8a52 Franklin Nicholas 195 73 B cc86d4d3-1618-415e-b7fc-a303f3b8dd6f Marcus Stroman R FA Fastball 92 12 25 1 0 0 0 1 1 0 1 0 false 5f4f9e11-f9b5-4221-95b6-13329553848d 1 false 0 false 0 false 0 0 0 0 0 0 0 0 0 0 0 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 d2c5e643-fe5d-4ece-8f1e-560d6b2048ed d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 0 0 4 BOT AT_BAT 2 Nick Franklin strikes out swinging. PITCH 2 2016-09-03 00:28:21 UTC 2016-09-03 00:28:25 UTC official kKL Strike Looking 87c484cc-e672-4a34-ab02-cc29101d8a52 Franklin Nicholas 195 73 B cc86d4d3-1618-415e-b7fc-a303f3b8dd6f Marcus Stroman R FA Fastball 92 8 59 2 0 1 0 1 1 1 1 0 false 0 false 0 false 0 false 0 0 0 0 0 0 0 0 0 0 2 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 d2c5e643-fe5d-4ece-8f1e-560d6b2048ed d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 2 0 6 TOP AT_BAT 4 Troy Tulowitzki singles to right center field. Russell Martin to second. PITCH 2 2016-09-03 00:53:49 UTC 2016-09-03 00:53:52 UTC official bB Ball 9cc5e32a-1dad-4b18-80c8-919ec0dac676 Tulowitzki Troy 215 75 R 8e841e8a-ed03-45e9-b002-9189c005596b Daniel Farquhar R CH Changeup 86 12 18 2 0 0 1 2 1 1 2 0 false 3da24e28-741c-4978-bdba-52de51975820 1 false 0 false 0 false 0 0 0 0 0 0 0 0 0 0 2 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 8e841e8a-ed03-45e9-b002-9189c005596b d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 4 0 7 BOT AT_BAT 1 Luke Maile homers to left field. PITCH 2 2016-09-03 01:14:58 UTC 2016-09-03 01:15:03 UTC official kKL Strike Looking d7bb376c-9f2b-449b-b1eb-c6be13aa4886 Maile Luke 225 75 R ef6e13f3-c4c7-4233-b098-356f73e50d39 Francisco Liriano L CH Changeup 84 4 2 2 0 1 0 0 1 1 0 0 false 0 false 0 false 0 false 0 0 0 0 0 0 0 0 0 0 4 2 ef6e13f3-c4c7-4233-b098-356f73e50d39 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 14a7138b-b12b-4dbf-a561-e715cd0491db d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 4 0 7 BOT AT_BAT 4 Evan Longoria strikes out swinging. PITCH 3 2016-09-03 01:24:16 UTC 2016-09-03 01:24:22 UTC official kF Foul Ball 8d6f801e-7f89-4a81-81ec-072f72604c8e Longoria Evan 210 74 R 19970eff-23b1-4fde-96b2-a8dbc4e8c07a Dennis Tepera R FA Fastball 94 11 3 3 0 1 1 0 1 2 0 0 false 0 false 0 false 908cf3f8-d7a4-4346-b39e-1f4f66a21864 3 false 0 0 0 0 0 0 0 0 0 0 6 2 19970eff-23b1-4fde-96b2-a8dbc4e8c07a 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 14a7138b-b12b-4dbf-a561-e715cd0491db d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 0 1 8 BOT AT_BAT 1 Corey Dickerson strikes out swinging. PITCH 4 2016-09-03 01:50:19 UTC 2016-09-03 01:50:24 UTC official kKS Strike Swinging 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 Dickerson McKenzie 205 73 L 8c293816-0944-42bc-89cf-58ca7ba61427 Daniel Barnes R FA Fastball 90 6 4 4 0 2 1 0 2 2 0 0 false 0 false 0 false 0 false 0 0 0 0 0 0 0 0 0 0 8 3 8c293816-0944-42bc-89cf-58ca7ba61427 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 c63208a8-f0cb-4984-996e-79a9fdc2970a d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0
252e4911-b809-48b1-8a53-6fcfd1f4c26c 565de4be-dc80-4849-a7e1-54bc79156cc8 REG 2016 2016-09-02 23:10:00 UTC closed 12602 N 2:52 172 1d678440-b4b1-4954-9b39-70afb3ebbcfa Blue Jays bdc11650-6f74-49c4-875e-778aeb7632d9 Rays 3aaaf4af-0f8c-49c1-8bf1-1780bb5a5f5c Tropicana Field turf 31042 St. Petersburg FL 33705 Tampa Bay mrf-342:mlcf-410:cf-404:rcf-370:rf-322:mlf-354:lf-315:mrcf-404:lcf-370 8 8 0 3 6 2 1 0 2 TOP AT_BAT 3 STEAL 1 2016-09-02 23:40:29 UTC 2016-10-15 05:00:29 UTC official - SEE RUNNER(S) OUTCOME e6b6b905-a355-4e85-84ca-db655cc3dce4 Travis Devon 190 69 R d2c5e643-fe5d-4ece-8f1e-560d6b2048ed Alexander Cobb R 0 0 0 0 0 0 0 1 0 0 1 0 false 7335e54f-cc2f-422c-808e-c19a267827a5 1 false CK 0 false 0 false 0 0 0 0 0 0 0 0 0 0 0 2 cc86d4d3-1618-415e-b7fc-a303f3b8dd6f 3da24e28-741c-4978-bdba-52de51975820 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 e6b6b905-a355-4e85-84ca-db655cc3dce4 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 07f8d416-1b0b-452c-a677-4e7a6d15d24a 78bbb2e3-487a-4f14-ad95-22dfae998a98 78bbb2e3-487a-4f14-ad95-22dfae998a98 267c9cd7-a2e2-4f88-8b9b-b7389b1a9ccd 8ec56596-5b8b-41f8-88a7-384f20b8b6a7 07f8d416-1b0b-452c-a677-4e7a6d15d24a 3da24e28-741c-4978-bdba-52de51975820 9cc5e32a-1dad-4b18-80c8-919ec0dac676 577a95ca-9043-4deb-963d-3b9aa6752d71 7335e54f-cc2f-422c-808e-c19a267827a5 e6b6b905-a355-4e85-84ca-db655cc3dce4 d2c5e643-fe5d-4ece-8f1e-560d6b2048ed d7bb376c-9f2b-449b-b1eb-c6be13aa4886 a85e4cd0-03e0-4761-9e77-31a14fd8af33 d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 8d6f801e-7f89-4a81-81ec-072f72604c8e 00856892-9a5a-4161-b979-4335dab399cc 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 908cf3f8-d7a4-4346-b39e-1f4f66a21864 87c484cc-e672-4a34-ab02-cc29101d8a52 5f4f9e11-f9b5-4221-95b6-13329553848d d1c9fb51-c10d-4e06-923d-cd9b5dab07ed 908cf3f8-d7a4-4346-b39e-1f4f66a21864 8d6f801e-7f89-4a81-81ec-072f72604c8e a85e4cd0-03e0-4761-9e77-31a14fd8af33 00856892-9a5a-4161-b979-4335dab399cc 5f4f9e11-f9b5-4221-95b6-13329553848d 87c484cc-e672-4a34-ab02-cc29101d8a52 21e3d551-a8b8-4f6b-9d06-6832e527ddc1 d7bb376c-9f2b-449b-b1eb-c6be13aa4886 0 0

You'll notice that there are multiple duplicates for gameId in our results. It turns out our dataset isn't just giving us the results of MLB games - it's giving us the result of every score in every game. That's a lot of data!

Let's say we only care about the outcome of entire games, as opposed to every score. That seems reasonable. First things first, let's rid ourselves of all these extra columns:

specific_columns_df = df.select("gameId",
                                "awayTeamName",
                                "homeTeamName",
                                "durationMinutes",
                                "homeFinalRuns",
                                "awayFinalRuns")

display(specific_columns_df)

This will give us columns which are only relevant to entire games, as opposed to every score. But wait, we still have separate rows for every game! Let's make sure our dataset only has a single record per game:

dropped_df = specific_columns_df.dropDuplicates(subset = ['gameId'])

display(dropped_df)

A quick comparison:

print('Original column count = ', specific_columns_df.count())
print('Dropped column count = ', dropped_df.count())
Original column count =  4131
Dropped column count =  40

Wow! We've gone from 4k+ games to 40. That sounds more reasonable.

User-Defined Functions

What if we want to transform our data in a less predictable way, like by creating our own customizations? Is that so much much to ask? It isn't, but it's significantly more difficult/convoluted than, say, Pandas. Optimizing code for speed at runtime sure is a bitch.

Custom transformations in PySpark can happen via User-Defined Functions (also known as udfs). As you may imagine, a user-defined function is just a function we create ourselves and apply to our DataFrame (think of Pandas' .apply()).

To user udfs, we need to import udf from pyspark.sql.functions, as well as any other imports we'll be using within that UDF. Furthermore, we'll need to import the type of data we're expecting to be returned from our function:

from pyspark.sql.functions import udf, array
from pyspark.sql.types import StringType

We're importing array because we're going to compare two values in an array we pass, with value 1 being the value in our DataFrame's homeFinalRuns column, and value 2 being awayFinalRuns. We're also importing StringType, because we'll be returning the name of the team which wins:

from pyspark.sql.functions import udf, array
from pyspark.sql.types import StringType

determine_winner_udf = udf(lambda arr: arr[2] if arr[0] > arr[1] else arr[3], StringType())

df_with_winner = dropped_df.withColumn("winner", determine_winner_udf(array('homeFinalRuns', 'awayFinalRuns', 'homeTeamName', 'awayTeamName')))
display(df_with_winner)

It isn't beautiful, but it gets the job done. For each row in our DataFrame, we pass 4 values:

  • The home team score.
  • The away team score.
  • The home team name.
  • The away team name.

Our udf, determine_winner_udf, determines a winner from the first two array values. Depending on who wins, our lambda returns the home team name (arr[2]) or the away team name (arr[3]).

Let's see what we've got:

gameId awayTeamName homeTeamName durationMinutes homeFinalRuns awayFinalRuns winner
ac094965-0aeb-414f-862b-a40c4e099cce Athletics Royals 203 3 16 Royals
04e34b05-d2c5-47f8-9a4b-4b0855668c3e Marlins Nationals 183 2 1 Nationals
1c3f6de9-6dfe-41cf-9c3c-78b7a2c20e4d Athletics Mariners 174 1 6 Athletics
4ea303c3-331b-4800-84eb-bdbec947d6e2 Angels Mariners 175 0 3 Angels
7c5f774b-f44d-4dca-8ad4-9d5936c454e7 Cardinals Nationals 192 10 2 Cardinals
bddd838d-8297-413d-b656-70c995792730 Yankees Orioles 182 2 0 Orioles
873af90e-d93f-4195-ab6c-8855abd81570 Rays Orioles 181 2 1 Orioles
9bae7d32-d93c-4d29-8831-08f9ac8575ab Royals Twins 187 3 10 Twins
9d899cea-4106-454e-baf9-9ab8b1c03fa1 Indians Twins 187 4 5 Indians
b2aac877-fed6-4372-835b-72b53a7932b8 Mariners Twins 183 3 4 Mariners
83715aca-9556-42e4-93df-afc83783301c White Sox Twins 192 11 3 White Sox
76728b44-f34f-4c0b-ade7-b98e26871939 White Sox Royals 184 10 3 White Sox
7c9914e0-70be-45b6-9a3f-d509b65d668c Rays Mariners 185 5 2 Mariners
cdc6c85b-02ad-4421-af06-e361079106d7 Mariners Twins 184 1 10 Mariners
c63d2929-b532-4a3d-baa8-4fbd8204aaba Athletics Mariners 175 2 3 Athletics
6ead0ecd-3533-4be3-8e9e-a9ab85bdfd5d Tigers Twins 189 2 9 Tigers
95ea23f8-308c-494b-9c91-261b9d4472f5 Mets Indians 217 5 6 Mets
d725433c-f63c-4ff3-ad39-65de893bda30 Mets Indians 174 7 5 Indians
89fda312-79f4-455d-8d99-0dde5264caa5 Angels Mariners 221 6 7 Angels
2a2c4cf9-a3b1-435c-999c-0ad5bc36283b Mariners Twins 126 3 2 Twins
822cfa5a-c351-4539-b2f7-7c32f2a55a0d Rangers Mariners 150 8 3 Mariners
4c9c728d-26eb-4526-8253-9cdb785dba77 Rays Blue Jays 133 3 2 Blue Jays
08a97320-2b6b-437f-9bc9-05f56a4885b7 Royals Twins 188 6 5 Twins
c0a16323-7f9d-4a61-a9f4-81d5c391febf White Sox Royals 143 2 1 Royals
3db71f60-379f-4601-9248-6e76ef2fee58 Rays Indians 150 6 1 Indians
3e25e986-46d1-4af9-9b9c-1a8d8b8b802a Royals Cardinals 268 2 3 Royals
1ec06d4d-93f2-4a73-8bda-d3a1e875cbe0 Rockies Giants 205 7 17 Giants
450f94fd-6e2a-4b49-8247-c36214987ca2 Pirates Nationals 348 1 2 Pirates
5bbbd0ec-a8be-4d9d-ace3-816ee352744c Rays Orioles 164 5 4 Orioles
74e99b23-6e75-4c8a-82e2-466c95de9b3f Astros Mariners 182 11 1 Mariners
35e79e8e-8454-4379-9162-227ca48f4e68 Braves Phillies 194 0 2 Braves
f3655f56-4c29-4d8b-932c-7379c73f4417 Rays Mariners 241 6 5 Mariners
e556e122-8536-4041-bc93-0af2f79ae55a Tigers Twins 166 1 8 Tigers
edd0978a-53a2-43e5-b41a-b8da39cd3b09 Tigers Twins 165 3 8 Tigers
f9d54bbf-7fa6-4665-b850-5f59f6f1a474 Rangers Rays 181 8 4 Rays
26e0a087-d990-4617-a5c1-91841a473ba3 Tigers Twins 169 5 8 Tigers
57f428bc-ebfd-4ea7-9d86-1a6792ce64de White Sox Twins 286 11 13 White Sox
25a1706f-2328-4f44-9754-4f25599f9c88 White Sox Twins 179 4 11 Twins
ab54f09c-9326-46bc-8731-2a9515e5ed3c Mets Indians 152 0 6 Mets
6dc681ea-0abc-457d-8b0a-a7c0daae412e Pirates Rockies 173 11 5 Pirates

Visualizing the Results

It seems like we've got what we wanted! We now have a dataset which can tell us the winningest team in the 2016 post-season (kind of: we're using a limited dataset, but whatever). How can we visualize this data? Why, with the Databricks built-in plot options, of course! Each time we use display() to show our DataFrame, we can modify the plot options to show us a chart representing our data, as opposed to a table:

Executing Basic DataFrame Transformations in PySpark
Databricks plot options.

From the chart-looking dropdown, select bar chart. Next, check out the plot options button which results in this modal:

Executing Basic DataFrame Transformations in PySpark
Modifying our plot options to show us winning teams.

I've messed with the settings to show us a distribution of wins above. We aggregate by COUNT, thus counting the number of instances where the winner column contains each of the team names involved.

A Moment of Reflection

You've done great, young Padawan. We took a real-life instance of some data we wanted to change, and we changed it: all in PySpark.

As you've probably noticed, working with PySpark isn't at all like working in pure-Python alternatives for modifying data. Sure, we're writing code in Python, but as we implement explicit type-setting and navigate user-defined functions, it becomes painfully evident that we're using an API that hooks into a Java application. On the bright side, we've built a respectable string of transformations which can occur across multiple nodes without writing a single line of Scala (or worse yet, Java).

When we consider the scalability, speed, and power of what we've just built, the little quirks don't seem so bad anymore.