quick type test
Browse files
nba_tracking_data_15_16.py
CHANGED
@@ -91,7 +91,7 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
91 |
"moments": datasets.Sequence(
|
92 |
# question, how to indicate lists of lists of different types
|
93 |
{
|
94 |
-
"quarter": datasets.Value("
|
95 |
# "game_clock": datasets.Value("float32"),
|
96 |
# "shot_clock": datasets.Value("float32"),
|
97 |
# "ball_coordinates": datasets.Sequence(
|
@@ -181,8 +181,10 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
181 |
game_id = game["gameid"]
|
182 |
game_date = game["gamedate"]
|
183 |
for event in game["events"]:
|
|
|
184 |
event_id = event["eventId"]
|
185 |
for moment in event["moments"]:
|
|
|
186 |
quarter = moment[0]
|
187 |
game_clock = moment[2]
|
188 |
shot_clock = moment[3]
|
|
|
91 |
"moments": datasets.Sequence(
|
92 |
# question, how to indicate lists of lists of different types
|
93 |
{
|
94 |
+
"quarter": datasets.Value("int64"),
|
95 |
# "game_clock": datasets.Value("float32"),
|
96 |
# "shot_clock": datasets.Value("float32"),
|
97 |
# "ball_coordinates": datasets.Sequence(
|
|
|
181 |
game_id = game["gameid"]
|
182 |
game_date = game["gamedate"]
|
183 |
for event in game["events"]:
|
184 |
+
print(type(event))
|
185 |
event_id = event["eventId"]
|
186 |
for moment in event["moments"]:
|
187 |
+
print(type(moment))
|
188 |
quarter = moment[0]
|
189 |
game_clock = moment[2]
|
190 |
shot_clock = moment[3]
|