Ipl Tasks
Ipl Tasks
Description of datasets:
id: A unique identifier for each match in the dataset.
season: The year or season in which the match was played (e.g., 2017).
city: The city where the match took place.
date: The date when the match was played.
team1: The name of the first team (the team that batted first).
team2: The name of the second team (the team that batted second).
toss_winner: The team that won the toss at the beginning of the match.
toss_decision: The decision made by the toss-winning team, whether to bat or field.
result: The result of the match (e.g., "normal" indicating a regular match).
dl_applied: Indicates if the DLS (Duckworth-Lewis) method was applied due to interruptions
(0 for no, 1 for yes).
winner: The team that won the match.
win_by_runs: The number of runs by which the winning team won the match (0 if the match
was won by wickets).
win_by_wickets: The number of wickets by which the winning team won the match (0 if the
match was won by runs).
player_of_match: The player who was awarded the "Player of the Match" title for their
performance.
venue: The stadium or ground where the match was played.
umpire1: The name of the first umpire who officiated the match.
umpire2: The name of the second umpire who officiated the match.
Note: you can replace the occurrences of "Rising Pune Supergiant" with "Rising Pune Supergiants" in
your pandas DataFrame using the str.replace() function. Here's how to do it:
Univariate Analysis:
1) Which team won the most matches in 2017?
2) How many matches were played each season?
3) How many teams played in each season? (The nunique() function in pandas is used to count
the number of distinct (unique) values in a particular column or series.) eg
matches.groupby('season')['team1'].nunique().plot(kind = 'bar', figsize=(15,5))
4) Which team has dominated IPL so far?
5) Venue which has hosted most number of IPL matches?
6) Umpires who have appeared in most number of matches?
7) Is there a relationship between umpires and finals?
8) Do teams bat first or second after winning toss?
9) Do teams win more batting first or batting second?
10) Does winning toss help in winning matches?
11) Which player's performance has mostly led to his team's win?
12) Has Gayle won MoM(man of the match) awards consistently across all venues or does he
have a skewed distribution towards any particular venue?
13) Which team won the most matches in 2017?
14) How many matches were played in each city?
15) What is the average number of runs by which teams win in each season?
16) Which player won the most "Player of the Match" awards in 2017?
17) How many matches did each team win at home (based on the venue)?
18) What is the win percentage for each team in 2017?
19) What was the total number of wickets taken by each team?
20) How many matches did each umpire officiate in total?
21) Which venue hosted the most matches in 2017?
22) Which team had the highest average number of runs won by in 2017?
23) What is the total number of wins by wickets for each team in 2017?
24) Which umpire pair was the most common in 2017?
25) How many times did each team win by 0 runs in 2017?
26) Which team won the most matches in a particular city?
27) What was the total number of runs and wickets won by each team?
Bivariate Analysis
1) Do teams bat first or second after winning toss?
2) How toss decision affects match results?
3) Does winning matches by fielding first vary across venues or it is
universally true for all venues?
5) Does winning by fielding first also valid for rain affected (dl) matches?
6) Are there any specific venues where DL has been most applied?
7) Which team has defended handsomely after winning toss i.e. won by big margins?
8) Which team has chased down totals successfully with good number of wickets left at hand
Notes: I know some of the topics we are covering might seem a bit tough right now, and I want
to assure you that it’s okay to feel that way! This subject can sometimes be tricky, especially
when dealing with concepts like groupings, aggregations, and data cleaning. But don’t worry—
this is part of the learning process, and we'll break it down step-by-step in our upcoming classes.