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.
Filter the DataFrame df
to only include games of the genre Sports
and assign the result to sports_df
.
Filter the DataFrame df
to only include games with sales exceeding 1 million in North America and assign the result to na_sales_df
.
Retrieve games released on the platform PS2
in the year 2005
and assign the result to ps2_2005_df
.
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
.
Filter the DataFrame df
to only include games published by Nintendo
and of the genre Action
and assign the result to nintendo_action_df
.
Get all games belonging to the genres Action
and Sports
and assign the result to action_sports_df
.
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
.
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
.
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
.
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
.
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
.
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
.
Write the answer after rounding-off to 2 decimal places. For example, if the answer is 123.456789, write 123.46.
Write the answer as a string. For example, if the answer is Action
, write Action
.
Write the answer after rounding-off to 2 decimal places.
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
.
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
.
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']._____()