Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -126,6 +126,7 @@ df_2023['pos_new'] = ['D' if "D" in x else 'F' for x in df_2023['display_positio
|
|
126 |
|
127 |
player_games = pd.read_csv('Drive/player_games_cards.csv',index_col=[0]).sort_values(by='date').drop_duplicates(subset=['player_id','date'])
|
128 |
summary_2023 = pd.read_csv('Drive/summary_2024.csv',index_col=[0])#.drop_duplicates(subset=['player_id'])
|
|
|
129 |
summary_2022 = pd.read_csv('Drive/2022-23/summary_2023.csv',index_col=[0])
|
130 |
team_games = pd.read_csv('Drive/team_games.csv',index_col=[0])
|
131 |
nhl_logos = pd.read_csv("NHL Logos - NHL Logos.csv")
|
@@ -449,7 +450,7 @@ def server(input, output, session):
|
|
449 |
#test.loc[name == test.Player].reset_index().TOI[0]/1.5
|
450 |
min_time = min(math.floor(summary_2023.loc[player_id == summary_2023.player_id].reset_index().TOI[0]/100)*100,summary_2023.GP.max()*10)
|
451 |
# min_time = min(math.floor(test.loc[name == test.Player].reset_index().TOI[0]/100)*100,test.GP.max()*10)
|
452 |
-
summary_2023 = summary_2023.drop_duplicates(subset=['player_id'])
|
453 |
test_filter = summary_2023[(summary_2023.TOI >= min_time)&(summary_2023.pos == summary_2023.loc[player_id == summary_2023.player_id].reset_index().pos[0])]
|
454 |
test_filter['Goals/GP'] = test_filter['Goals']/test_filter['GP']
|
455 |
test_filter['Total Assists/GP'] = test_filter['Assists']/test_filter['GP']
|
|
|
126 |
|
127 |
player_games = pd.read_csv('Drive/player_games_cards.csv',index_col=[0]).sort_values(by='date').drop_duplicates(subset=['player_id','date'])
|
128 |
summary_2023 = pd.read_csv('Drive/summary_2024.csv',index_col=[0])#.drop_duplicates(subset=['player_id'])
|
129 |
+
|
130 |
summary_2022 = pd.read_csv('Drive/2022-23/summary_2023.csv',index_col=[0])
|
131 |
team_games = pd.read_csv('Drive/team_games.csv',index_col=[0])
|
132 |
nhl_logos = pd.read_csv("NHL Logos - NHL Logos.csv")
|
|
|
450 |
#test.loc[name == test.Player].reset_index().TOI[0]/1.5
|
451 |
min_time = min(math.floor(summary_2023.loc[player_id == summary_2023.player_id].reset_index().TOI[0]/100)*100,summary_2023.GP.max()*10)
|
452 |
# min_time = min(math.floor(test.loc[name == test.Player].reset_index().TOI[0]/100)*100,test.GP.max()*10)
|
453 |
+
#summary_2023 = summary_2023.drop_duplicates(subset=['player_id'])
|
454 |
test_filter = summary_2023[(summary_2023.TOI >= min_time)&(summary_2023.pos == summary_2023.loc[player_id == summary_2023.player_id].reset_index().pos[0])]
|
455 |
test_filter['Goals/GP'] = test_filter['Goals']/test_filter['GP']
|
456 |
test_filter['Total Assists/GP'] = test_filter['Assists']/test_filter['GP']
|