Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use pandas in python solve the problem for the data as below( you don't have to calculate the exact answer for this data, I just

image text in transcribedUse pandas in python solve the problem for the data as below( you don't have to calculate the exact answer for this data, I just need the method)

thanks!

image text in transcribed

Problem 5: count_types Write a function called count_types that returns a dictionary with keys that are Pokemon types and values that are the number of times that type appears in the dataset. The order of the keys in the dictionary does not matter. Note that you will want to return a Python dictionary for this function so you will have to convert from a pandas object to a dictionary. 1 id, name, level, personality, type, weakness, atk, def, hp, stage 2 53, Persian, 40,mild, normal, fighting, 104, 116, 147,2 3 126, Magmar, 44, docile, fire, water,96,83,153,1 4 99, Kingler,33, adamant,water, electric,110,169,29,2 5 57,Primeape ,9, lonely, fighting, flying, 20,66,43,2 6 3, Venusaur, 44, sassy, grass, fire, 136,195,92,3 7 23, Ekans , 81, hasty,poison, psychic,30,108,20,1 8 11, Metapod, 4, naive, grass, fire, 30,114,22,2 9 126, Magmar,96,modest, fire, water,62,114,155,1 O 137, Porygon, 96, relaxed, normal, fighting, 68,50,127,1 1 69,Bellsprout,84, lonely,grass, fire, 149,32,45,1 2 10,Caterpie,3, serious, bug, flying,7,10,15,1 3 12, Butterfree, 12, hasty, bug, flying, 20,25,35,3 4 35,Clefairy, 18, impish, fairy,poison, 33,25,50,1 5 23, Ekans, 15, Jolly,poison, psychic,40,15,35,1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions