Aggregating Pokémon Data With Python and Pandas
Aggregating Pokémon Data With Python and Pandas
Share this
START CODING TODAY CAREERS IN CODING LEARNING TO CODE
Aggregating Pokémon
Data with Python and
Pandas
Most of the time, high-level decision-
makers require aggregated data. For
example, to understand sales trends,
business analysts need to aggregate
individual sales transactions by month,
quarter, or scal year. Data aggregation is
a key skill that can drive value for many
organizations.
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 1/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
Share this
Share this
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 3/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
Share this
Pokémon that belong to two types occupy two rows
in our spreadsheet. In addition, every Pokémon has
multiple stats to determine how it performs in battle.
A description of each stat can be found in the
Pokémon Database. For example, Blastoise has a
higher defense stat than Charizard, so it will better
withstand physical attacks. For our analysis, we will
look at the type with the highest number for each
stat.
The resulting pivot table has a row for each unique type
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 4/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
We are counting the number of unique Pokémon names for each type
The highest values in each column are highlighted in green, and lowest values are
highlighted in yellow
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 6/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
Now to Python
Spreadsheets are great, and we were able to glean
some fun insights from our pivot table analysis.
However, using Python with the Pandas library is far
superior to spreadsheet analysis.
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 8/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 9/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
Share this
What’s next
High-level decision makers often require analysts to
make minor adjustments to view data in a slightly
different format. In these cases, Python will save
signi cantly more time when compared to traditional
spreadsheet analysis.
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 10/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
UPDATES
Livestream: Getting Started with C++
Whether you're new to coding or trying to pick up a new language, our
C++ livestream is one that you won't want to miss.
CODECADEMY TEAM
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 12/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 13/13
24/08/2020 Aggregating Pokémon Data with Python and Pandas
LOG IN WITH
OR SIGN UP WITH DISQUS ?
Name
— Codecademy News —
https://news.codecademy.com/aggregating-pokemon-data-python-pandas/ 11/13