Last active
June 5, 2021 18:46
-
-
Save Lakshmi-1212/5907030e97ca63a2131ebe031a5513ea to your computer and use it in GitHub Desktop.
Merge data and add general statistics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Combine the batting and bowling dataframes to create a merged players dataframe | |
players = pd.merge(all_df,batdf, left_index=True, right_index=True,how='outer') | |
players = pd.merge(players,bowldf, left_index=True, right_index=True,how='outer') | |
# Number of man of the matches from matches file | |
players = pd.merge(players,matches['player_of_match'].value_counts(), left_index=True, right_index=True,how='left') | |
players['player_of_match'] = players[['player_of_match']].fillna(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment