C 0 [6] 2 3 4 641 642 643 Name Type Accuracy Effect & PP Power Tackle Normal NaN 35 Growl Normal NaN 40 NaN 25 NaN 35 Na
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
C 0 [6] 2 3 4 641 642 643 Name Type Accuracy Effect & PP Power Tackle Normal NaN 35 Growl Normal NaN 40 NaN 25 NaN 35 Na
E26. Use the groupby function to display the unique values in the Type column, and how many of each value there are in the data-set. [7] 1 <pandas.core.groupby.generic.DataFrameGroupBy object at 0x7f3f09ald0d0> E27. Now use the value_counts() function to display the unique values in the Type column, and how many of each value there are in the data-set. Type Bug Dark E28. Display the average Power for each of the different types of moves. The output should resemble the following: 1 Ice Dragon Electric Fairy Fighting Fire Flying Ghost Grass Ground Normal Poison Psychic 45.000000 33.571429 72.692308 52.321429 27.631579 58.414634 84.193548 61.458333 43.571429 47.051282 48.043478 51.750000 28.923977 37.692308 27.796610
E29. Display the average Accuracy of each type in descending order. The output should resemble the following: Type Fire Dragon Dark Water Ghost Fighting Grass Ice Flying Ground Bug Poison Rock [ ] 1 91.129032 87.692308 84.000000 81.250000 80.952381 80.609756 77.948718 77.250000 Electric Steel Normal Fairy Psychic Name: Accuracy, dtype: float64 76.041667 75.434783 73.928571 72.884615 70.588235 70.535714 69.782609 56.695906 49.736842 41.016949 ▸ 1 E30. Some of those averages look a little low. Create a histogram of the Power attribute using 10 bins.
E30. Some of those averages look a little low. Create a histogram of the Power attribute using 10 bins. [ ] 1 E31. It looks like there are many moves with a power of 0. This is probably because we replaced a bunch of NaN s with 0. Create a histogram of all moves with a power greater than 0. As before, use 10 bins. [ ] 1