Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -353,6 +353,10 @@ def server(input, output, session):
|
|
353 |
yahoo_df = yahoo_df_2.merge(yahoo_nhl_df,left_on = 'player_id',right_on='player_id_yahoo',suffixes=['','_y'])
|
354 |
yahoo_df.nhl_id = yahoo_df.nhl_id.astype(float)
|
355 |
test.player_id = test.player_id.astype(float)
|
|
|
|
|
|
|
|
|
356 |
|
357 |
test = test.merge(right=yahoo_df,left_on='player_id',right_on='nhl_id',suffixes=['','_y'],how='left')
|
358 |
|
@@ -374,7 +378,7 @@ def server(input, output, session):
|
|
374 |
test = test.rename(columns={'display_position':'Position'})
|
375 |
|
376 |
|
377 |
-
top_d_score = test.copy()
|
378 |
print(top_d_score)
|
379 |
if input.x():
|
380 |
top_d_score = top_d_score.dropna(axis='columns')
|
|
|
353 |
yahoo_df = yahoo_df_2.merge(yahoo_nhl_df,left_on = 'player_id',right_on='player_id_yahoo',suffixes=['','_y'])
|
354 |
yahoo_df.nhl_id = yahoo_df.nhl_id.astype(float)
|
355 |
test.player_id = test.player_id.astype(float)
|
356 |
+
if len(test[test.nhl_id == 8478427]) > 0:
|
357 |
+
return test.style
|
358 |
+
|
359 |
+
#print(test[test.nhl_id == 8478427])
|
360 |
|
361 |
test = test.merge(right=yahoo_df,left_on='player_id',right_on='nhl_id',suffixes=['','_y'],how='left')
|
362 |
|
|
|
378 |
test = test.rename(columns={'display_position':'Position'})
|
379 |
|
380 |
|
381 |
+
top_d_score = test.copy()[(test.Team==input.team_id())].sort_values(by=['L'+str(n_1)+' PP%'],ascending=False).reset_index(drop=True)
|
382 |
print(top_d_score)
|
383 |
if input.x():
|
384 |
top_d_score = top_d_score.dropna(axis='columns')
|