Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -353,14 +353,14 @@ 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 |
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 |
-
|
363 |
-
|
364 |
test.loc[test.display_position.isna(),'display_position'] = test.loc[test.display_position.isna(),'Position']
|
365 |
test.display_position = test.display_position.replace({'L':'LW','R':'RW'})
|
366 |
test.percent_owned = test.percent_owned.fillna(0)
|
|
|
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 |
+
|
358 |
+
test = test.merge(right=yahoo_df,left_on='player_id',right_on='nhl_id',suffixes=['','_y'],how='left')
|
359 |
+
if len(test[test.player_id == 8478427]) > 0:
|
360 |
return test.style
|
361 |
|
362 |
#print(test[test.nhl_id == 8478427])
|
363 |
|
|
|
|
|
|
|
364 |
test.loc[test.display_position.isna(),'display_position'] = test.loc[test.display_position.isna(),'Position']
|
365 |
test.display_position = test.display_position.replace({'L':'LW','R':'RW'})
|
366 |
test.percent_owned = test.percent_owned.fillna(0)
|