Update app.py
Browse files
app.py
CHANGED
|
@@ -1274,7 +1274,7 @@ def server(input, output, session):
|
|
| 1274 |
|
| 1275 |
pitch_x_what = []
|
| 1276 |
pitch_y_what = []
|
| 1277 |
-
|
| 1278 |
from datetime import timedelta
|
| 1279 |
for i in range(0,len(test_list_2)):
|
| 1280 |
#n = n + 10000
|
|
@@ -1288,7 +1288,7 @@ def server(input, output, session):
|
|
| 1288 |
batter_name_list.append(test_list_3[i]['batter']['fullName'])
|
| 1289 |
pitcher_id_list.append(test_list_3[i]['pitcher']['id'])
|
| 1290 |
pitcher_name_list.append(test_list_3[i]['pitcher']['fullName'])
|
| 1291 |
-
date_list.append((datetime.
|
| 1292 |
|
| 1293 |
desc_list.append(test_list_2[i][j]['details']['description'] if 'description' in test_list_2[i][j]['details'] else np.nan)
|
| 1294 |
code_list.append(test_list_2[i][j]['details']['code'] if 'code' in test_list_2[i][j]['details'] else np.nan)
|
|
|
|
| 1274 |
|
| 1275 |
pitch_x_what = []
|
| 1276 |
pitch_y_what = []
|
| 1277 |
+
from datetime import datetime
|
| 1278 |
from datetime import timedelta
|
| 1279 |
for i in range(0,len(test_list_2)):
|
| 1280 |
#n = n + 10000
|
|
|
|
| 1288 |
batter_name_list.append(test_list_3[i]['batter']['fullName'])
|
| 1289 |
pitcher_id_list.append(test_list_3[i]['pitcher']['id'])
|
| 1290 |
pitcher_name_list.append(test_list_3[i]['pitcher']['fullName'])
|
| 1291 |
+
date_list.append((datetime.strptime(test_list_2[i][j]['startTime'][0:16], '%Y-%m-%dT%H:%M') - timedelta(hours=8)).date())
|
| 1292 |
|
| 1293 |
desc_list.append(test_list_2[i][j]['details']['description'] if 'description' in test_list_2[i][j]['details'] else np.nan)
|
| 1294 |
code_list.append(test_list_2[i][j]['details']['code'] if 'code' in test_list_2[i][j]['details'] else np.nan)
|