Player Picks: A Dive into Series Filtering
Player Picks: A Dive into Series Filtering Data Science Project
Intro to Pandas for Data Analysis

Player Picks: A Dive into Series Filtering

In this project, we will explore the fundamentals of filtering with Series by analyzing a dataset containing match statistics for football players and teams. By engaging with activites of this project, you will develop skills in filtering Series based on specific criteria, allowing you to extract meaningful insights from the match statistics.
Start this project
Player Picks: A Dive into Series FilteringPlayer Picks: A Dive into Series Filtering
Project Created by

Vidhi Shah

Project Activities

All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.

All our activities include solutions with explanations on how they work and why we chose them.

codevalidated

Create a series from the `PlayerName` column.

Let's start off by creating a pandas series using the PlayerName column from the dataset to analyze player names.

Store the series in a variable named player_names.

Your result would look something like this :

img1

codevalidated

Filter out unique player names.

Using the previously defined player_names series, find out the unique player names from it!

Use the unique() method for it.

Store your results in a variable named unique_player_names.

Your result would look something like this :

img2

multiplechoice

Who Are the Goalkeepers?

Filter the match_stats DataFrame using the IsGoalkeeper column to identify goalkeepers.

From the filtered result, select only the PlayerName column. The resulting Series will contain the names of all players who are goalkeepers.

Choose the correct name of the player who is a goalkeeper from the following options:

codevalidated

Filter players with a specific surname.

Create a series of player names, where the PlayerSurname is Alioski.

Store the result in a variable named player_surname.

Your result would look something like this :

img4

codevalidated

Filter players who played less than 30 minutes.

Create a series of PlayerID, of players who have played for less than 30 minutes of PlayedTime.

Store the result in a variable named player_time.

Your result would look something like this :

img5

multiplechoice

How would you filter a series `s` to keep only unique values?

codevalidated

Find players from a specific home team.

Create a series of player names, who have played for the HomeTeamName - Wales.

Store the result in a variable named home_team_wales.

Your result would look something like this :

img7

codevalidated

Filter player id's with missing player names.

Create a series of PlayerID, of players where PlayerName is missing (null).

Store the result in a variable named missing_playername_id.

Your result would look something like this :

img8

multiplechoice

What's the difference between `series.isnull()` and `series.notnull()` ?

codevalidated

Filter players by multiple team names.

Using isin method create a series of player names who belong to either North Macedonia or Germany as their home team.

Store the result in a variable named multiple_team_name.

Your result would look something like this :

img10

input

What is the `PlayerID` of Stefan?

Using loc method, retrieve the PlayerID for the player named Stefan.

multiplechoice

Which of the following best describes the `isin()` method in series filtering?

Player Picks: A Dive into Series FilteringPlayer Picks: A Dive into Series Filtering
Project Created by

Vidhi Shah

As a Project Author at DataWars, I dive into the world of data science and AI/ML with a millennial flair, constantly intrigued by the inner workings of technology. While I'm not crunching numbers, you'll find me cheering for my favorite cricket team.

As a Project Author at DataWars, I dive into the world of data science and AI/ML with a millennial flair, constantly intrigued by the inner workings of technology. While I'm not crunching numbers, you'll find me cheering for my favorite cricket team.

This project is part of

Intro to Pandas for Data Analysis

Explore other projects