IPL TEAM PERFORMANCE ANALYSIS USING PYTHON
Python Source Code
import pandas as pd
import [Link] as plt
# Load datasets
matches = pd.read_csv("[Link]")
deliveries = pd.read_csv("[Link]")
# Display first 5 rows
print([Link]())
# Total matches won by each team
team_wins = matches['winner'].value_counts()
print("\nTeam Wins:\n", team_wins)
# Plot team wins
[Link]()
team_wins.plot(kind='bar')
[Link]("IPL Team Wins")
[Link]("Teams")
[Link]("Number of Wins")
[Link]()
# Toss decision impact
toss_win_match_win = matches[matches['toss_winner'] == matches['winner']]
print("\nToss Win = Match Win Count:", toss_win_match_win.shape[0])
# Win percentage
win_percentage = (team_wins / team_wins.sum()) * 100
print("\nWin Percentage:\n", win_percentage)
# Plot win percentage pie chart
[Link]()
win_percentage.plot(kind='pie', autopct='%1.1f%%')
[Link]("Win Percentage by Teams")
[Link]("")
[Link]()
# Season wise matches
season_matches = matches['season'].value_counts().sort_index()
[Link]()
season_matches.plot(kind='line', marker='o')
[Link]("Season Wise Matches")
[Link]("Season")
[Link]("Matches")
[Link]()
Instructions to Run:
1. Install Python Libraries:
pip install pandas matplotlib
2. Place [Link] and [Link] in the same folder.
3. Run:
python ipl_analysis.py