Practicing filtering sorting with Pokemon
Practicing filtering sorting with Pokemon Data Science Project
Intro to Pandas for Data Analysis

Practicing filtering sorting with Pokemon

In this project you'll practice all the different sorting techniques related to pandas DataFrames, including sorting by value (in a single or multiple columns) and sorting by index. You'll also learn about the difference in applying sorting operations with the`inplace` parameter (that is, modifying the dataframe) or without it, to make the operation immutable.

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.

input

How many Pokemons exist with an `Attack` value greater than 150?

Find all the pokemons with an Attack value greater than 150 and enter the quantity:

codevalidated

Select all pokemons with a Speed of `10` or less

Use filtering to select those "slow" Pokemons with a Speed value of 10 or less. Store your results in the variable slow_pokemons_df.

input

How many Pokemons have a `Sp. Def` value of 25 or less?

The Sp. Def value indicates the defense power of a pokemon against Special abilities. How many pokemons have a value of 25 or less?

codevalidated

Select all the Legendary pokemons

Select only pokemons that are Legendary and store the result in the variable legendary_df.

input

Find the outlier

Take a look at the scatterplot that correlates pokemons Attack and Defense. What's the Name of the pokemon that is a clear outlier (strong Defense, but very low Attack).

input

How many Fire-Flying Pokemons are there?

How many pokemons are of Type 1 Fire and Type 2 Flying?

input

How many 'Poison' pokemons are across both types?

How many pokemons exist that are of type Poison in either Type 1 or Type 2?

input

What pokemon of `Type 1` *Ice* has the strongest defense?

Enter its name below....

input

What's the most common type of Legendary Pokemons?

What's the most common Type 1 for legendary pokemons? Enter it below.

input

What's the most powerful pokemon from the first 3 generations, of type water?

Find the pokemon most powerful pokemon (by Total) from the first 3 generations that is of type Water. Enter its name below.

input

What's the most powerful Dragon from the last two generations?

Find the most powerful pokemon (by Total) that is of type Dragon (either Type 1 or Type 2) and from the last two generations. Enter its name below.

codevalidated

Select most powerful Fire-type pokemons

Select all pokemons that have an Attack value above 100 and Type 1 equals to Fire (ignore Type 2 in this activity).

codevalidated

Select all Water-type, Flying-type pokemons

Select those pokemons that are of Type 1 Water and Type 2 Flying. Store the selection in the variable water_flying_df.

codevalidated

Select specific columns of Legendary pokemons of type Fire

Perform a selection in your Dataframe of all the Legendary pokemons that are of Type 1 Fire. But select only the columns Name, Attack and Generation. Store the results in a variable legendary_fire_df.

codevalidated

Select Slow and Fast pokemons

Take a look at the distribution of Pokemon's speed in the histogram included in the notebook. The red lines separate the slowest (bottom 5%) and fastest (top 5%) pokemons.

Select those pokemons that are either very slow (with Speed below the bottom 5%) or very fast (Speed above top 95%).

Store your results in the variable slow_fast_df.

input

Find the Ultra Powerful Legendary Pokemon

Take a look at the scatter plot correlating Defense to Attack. What's the Name of the pokemon indicated by the red arrow in the image below?

Practicing filtering sorting with PokemonPracticing filtering sorting with Pokemon
Author

Santiago Basulto

This project is part of

Intro to Pandas for Data Analysis

Explore other projects