add continue to check if len != 1
Browse files
nba_tracking_data_15_16.py
CHANGED
@@ -210,6 +210,8 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
210 |
event_id = event["eventId"]
|
211 |
|
212 |
event_row = pbp.loc[(pbp.GAME_ID == int(game_id)) & (pbp.EVENTNUM == int(event_id))]
|
|
|
|
|
213 |
|
214 |
event_type = event_row["EVENTMSGTYPE"].item()
|
215 |
|
|
|
210 |
event_id = event["eventId"]
|
211 |
|
212 |
event_row = pbp.loc[(pbp.GAME_ID == int(game_id)) & (pbp.EVENTNUM == int(event_id))]
|
213 |
+
if len(event_row) != 1:
|
214 |
+
continue
|
215 |
|
216 |
event_type = event_row["EVENTMSGTYPE"].item()
|
217 |
|