[go: up one dir, main page]

0% found this document useful (0 votes)
6 views3 pages

Ipl Tasks

The document outlines a dataset related to cricket matches, detailing various attributes such as match ID, teams, results, and player performance. It includes tasks for univariate and bivariate analysis, focusing on team performance, match outcomes, and the impact of toss decisions. Additionally, it emphasizes the importance of data cleaning and aggregation techniques in data analysis, assuring learners that understanding will improve with practice.

Uploaded by

sarojgiri853
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Ipl Tasks

The document outlines a dataset related to cricket matches, detailing various attributes such as match ID, teams, results, and player performance. It includes tasks for univariate and bivariate analysis, focusing on team performance, match outcomes, and the impact of toss decisions. Additionally, it emphasizes the importance of data cleaning and aggregation techniques in data analysis, assuring learners that understanding will improve with practice.

Uploaded by

sarojgiri853
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Pandas 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:

Assuming your DataFrame is named df

df['team1'] = df['team1'].str.replace('Rising Pune Supergiant', 'Rising Pune Supergiants')

df['team2'] = df['team2'].str.replace('Rising Pune Supergiant', 'Rising Pune Supergiants')

df['toss_winner'] = df['toss_winner'].str.replace('Rising Pune Supergiant', 'Rising Pune Supergiants')


df['winner'] = df['winner'].str.replace('Rising Pune Supergiant', 'Rising Pune Supergiants')
df['player_of_match'] = df['player_of_match'].str.replace('Rising Pune Supergiant', 'Rising Pune
Supergiants')

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?

4) Is batting second advantageous aross all years?

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

9) Have teams started to score more easily over the years?

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.

1. We’ll Take It Slowly:


o Groupby and Aggregation: These are important concepts where we’ll learn how
to summarize and analyze data. In simple terms, when we "group" data, we're
looking at different parts of the dataset (like teams, venues, seasons) and applying
some operations (like counting, summing, or averaging) to understand the trends
or patterns in the data.
2. Practical Practice:
o In the upcoming classes, we’ll practice these concepts more thoroughly. I’ll guide
you through the syntax and explain each part of the code, so you’ll get more
comfortable with it. It’s normal to feel a bit unsure now, but as we practice, it will
start making more sense.
3. Dealing with Real Data:
o Cleaning and Replacing Data: In some cases, like with replacing team names,
we’ll learn how to clean up the data so that it’s consistent and accurate. For
example, we saw how to replace the team name "Rising Pune Supergiant" with
the corrected "Rising Pune Supergiants". This is something that happens often
when dealing with real-world datasets, and we’ll practice it more in class.
4. Important Concepts for Data Analysis:
o Aggregation (summarizing data): Sometimes, we need to summarize data, like
counting how many matches each team played or finding out how many runs a
team won by. We'll break it down with simple examples to ensure you grasp the
basic idea.
o Data Types and Methods: In future lessons, we’ll focus on specific methods in
Python like .groupby(), .agg(), .apply(), and more. Each of these will help us
do something different with the data, like filtering, grouping, and summarizing.
5. Don’t Worry if You Don’t Get It Right Away:
o It’s completely fine if you don’t understand everything on your first try. Coding
and working with data can take some time. I’ll be here to help guide you through
the process, and you’ll have plenty of opportunities to practice these topics, so
you get the hang of it.

You might also like