Practicing filtering and sorting DataFrames with Video Game sales data
Practicing filtering and sorting DataFrames with Video Game sales data Data Science Project
Intro to Pandas for Data Analysis

Practicing filtering and sorting DataFrames with Video Game sales data

Embark on an exciting coding journey with our Pandas Data Manipulation Lab focused on exploring the fascinating world of video game sales! In this hands-on lab, you'll dive into a real-world video game sales dataset and learn how to filter and select data using the powerful Pandas library. With engaging activities and step-by-step guidance provided by our interactive chat, you'll master filtering rows and columns, and gain practical skills to analyze and extract valuable insights from the dataset. Get ready to level up your Pandas skills and become a data manipulation pro!
Start this project
Practicing filtering and sorting DataFrames with Video Game sales dataPracticing filtering and sorting DataFrames with Video Game sales data
Project Created by

Anurag Verma

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

Filter Games by Genre

Filter the DataFrame df to only include games of the genre Sports and assign the result to sports_df.

codevalidated

Filter the dataset to retrieve games with sales exceeding a certain threshold in North America

Filter the DataFrame df to only include games with sales exceeding 1 million in North America and assign the result to na_sales_df.

codevalidated

Retrieve games released on a specific platform in a particular year

Retrieve games released on the platform PS2 in the year 2005 and assign the result to ps2_2005_df.

codevalidated

Filter Games by Global Sales Range

Filter the DataFrame df to only include games with global sales between 20.0 and 30.0 million (both inclusive) and assign the result to global_sales_df.

codevalidated

Filter games by Publisher and Genre

Filter the DataFrame df to only include games published by Nintendo and of the genre Action and assign the result to nintendo_action_df.

codevalidated

Retrieve games belonging to multiple genres

Get all games belonging to the genres Action and Sports and assign the result to action_sports_df.

codevalidated

Select the games from the dataset based on multiple criteria, such as platform, genre, and sales

Get all games belonging to the genres Action and Sports and released on the platform PS2 with global sales between 5.0 and 30.0 million and assign the result to ps2_action_sports_df.

codevalidated

Filter Games by global sales range

Filter the DataFrame df to only include games with global sales between 5.0 and 30.0 million and assign the result to filtered_query_df.

codevalidated

Filter Games by Platform and Global Sales

Filter the DataFrame df to only include games released on the platform PS2 and with a global sales value greater than 5.0 million and assign the result to query_ps2_df.

codevalidated

Filtering Rows and Columns for games released after 2000

Filter the dataset to include games released after 2000 with a global sales value greater than 5.0 million, but only include the columns Name, Platform, Year, and Global_Sales and assign the result to query_rows_cols_df.

codevalidated

Filter the dataset to include games with a platform of either `PS4` or `NES`, and display only the columns `Name`, `NA_Sales`, and `EU_Sales`

Filter the dataset to include games with a platform of either PS4 or NES, and display only the columns Name, NA_Sales, and EU_Sales and assign the result to query_rows_cols_df2.

codevalidated

Get the sales data (all regions) for the top 10 games

Get the sales data (all regions) for the top 10 games and assign the result to top10_df. The DataFrame should only include the columns Name, NA_Sales, EU_Sales, JP_Sales, Other_Sales, and Global_Sales.

input

Calculate the average sales in North America (`NA_Sales`) for the `Action` genre

Write the answer after rounding-off to 2 decimal places. For example, if the answer is 123.456789, write 123.46.

input

Find the genre with the highest sales in Japan (`JP_Sales`)

Write the answer as a string. For example, if the answer is Action, write Action.

input

Determine the average sales in Europe (`EU_Sales`) for games published by `Electronic Arts`

Write the answer after rounding-off to 2 decimal places.

codevalidated

Find all the games released between 2005 and 2010 (inclusive) with multiple condition

Find all the games released between 2005 and 2010 (inclusive) that belong to the Action genre and have total global sales greater than 5 million Assign the result to games_2005_2010.

codevalidated

Find the top 10 games with multiple filters

Find the top 10 games with the highest sales in North America (NA_Sales) among the Shooter genre released after 2010. Assign the result to top_10_shooter_2010. The result should contain the following columns in the given order: Name, NA_Sales, EU_Sales, JP_Sales, Other_Sales, Global_Sales.

multiplechoice

Fill in the blanks to complete the code for conditional filtering and aggregation operations

In order to find the total sales (in million units) in Europe (EU_Sales) for games released in the year 2012 which option should be used to fill in the blanks in the following code?

sales_2012_europe = df.loc[df['Year'] == ______, 'EU_Sales']._____()
Practicing filtering and sorting DataFrames with Video Game sales dataPracticing filtering and sorting DataFrames with Video Game sales data
Project Created by

Anurag Verma

What's up, friends! 👋 I'm a computer science student about to finish my last year of college. 🎓 I LOVE writing code! ❤️ It makes me so happy! 😄 Whether I'm goofing in notebooks 📓 or coding in Python 🐍, writing programs is a blast! 💥

What's up, friends! 👋 I'm a computer science student about to finish my last year of college. 🎓 I LOVE writing code! ❤️ It makes me so happy! 😄 Whether I'm goofing in notebooks 📓 or coding in Python 🐍, writing programs is a blast! 💥

This project is part of

Intro to Pandas for Data Analysis

Explore other projects