Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -125,7 +125,7 @@ df_2023 = pd.DataFrame(data=total_list,columns=['player_id','rank_value','full',
|
|
125 |
df_2023['pos_new'] = ['D' if "D" in x else 'F' for x in df_2023['display_position']]
|
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])
|
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")
|
@@ -134,7 +134,10 @@ team_games = team_games.merge(right=nhl_logos[['Team Name','Team']],left_on=['te
|
|
134 |
|
135 |
player_games.player_id = player_games.player_id.astype(int)
|
136 |
summary_2023.player_id = summary_2023.player_id.astype(int)
|
137 |
-
|
|
|
|
|
|
|
138 |
|
139 |
yahoo_to_nhl_df = pd.read_csv('yahoo_to_nhl.csv', encoding='unicode_escape')
|
140 |
|
|
|
125 |
df_2023['pos_new'] = ['D' if "D" in x else 'F' for x in df_2023['display_position']]
|
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")
|
|
|
134 |
|
135 |
player_games.player_id = player_games.player_id.astype(int)
|
136 |
summary_2023.player_id = summary_2023.player_id.astype(int)
|
137 |
+
summary_2022.player_id = summary_2022.player_id.astype(int)
|
138 |
+
|
139 |
+
summary_2023 = summary_2023.drop_duplicates(subset='player_id')
|
140 |
+
summary_2022 = summary_2022.drop_duplicates(subset='player_id')
|
141 |
|
142 |
yahoo_to_nhl_df = pd.read_csv('yahoo_to_nhl.csv', encoding='unicode_escape')
|
143 |
|