Skip to content

Instantly share code, notes, and snippets.

@Lakshmi-1212
Last active June 6, 2021 14:01
Show Gist options
  • Save Lakshmi-1212/197e522fb71e8d76673cb9c0ffaffb4a to your computer and use it in GitHub Desktop.
Save Lakshmi-1212/197e522fb71e8d76673cb9c0ffaffb4a to your computer and use it in GitHub Desktop.
All players list
# Create a dataframe with all players list
all_players_dict = {}
out_temp = balldf.apply(lambda x: update_player_list(x),axis=1)
all_df = pd.DataFrame({'Players':list(all_players_dict.keys())})
all_df['matches'] = all_df['Players'].apply(lambda x: len(all_players_dict[x]))
all_df=all_df.set_index('Players')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment