nesticot commited on
Commit
eb434e0
·
verified ·
1 Parent(s): 126685b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -273,6 +273,10 @@ week_dict = yahoo_weeks.set_index('Number')['Week'].sort_index().to_dict()
273
  player_games = pd.read_csv('data/player_games_cards.csv',index_col=[0]).sort_values(by='date').drop_duplicates(subset=['player_id','date'])
274
  team_games = pd.read_csv('data/team_games.csv',index_col=[0])
275
 
 
 
 
 
276
  # players_df = pd.DataFrame(get_all_players_teams())
277
 
278
  # teams_df = pd.DataFrame(get_all_teams())
 
273
  player_games = pd.read_csv('data/player_games_cards.csv',index_col=[0]).sort_values(by='date').drop_duplicates(subset=['player_id','date'])
274
  team_games = pd.read_csv('data/team_games.csv',index_col=[0])
275
 
276
+
277
+ team_last = player_games.drop_duplicates(subset=['player_id'],keep='last')[['player_id','Team']].set_index('player_id')['Team'].to_dict()
278
+
279
+ player_games['Team'] = player_games['player_id'].map(team_last)
280
  # players_df = pd.DataFrame(get_all_players_teams())
281
 
282
  # teams_df = pd.DataFrame(get_all_teams())