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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

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 1
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 1 (106.04 KiB) Viewed 29 times
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 NaN 15 1 Vine Whip Poison Powder Fleur Cannon Spectral Thief Mind Blown 644 Plasma Fists Electric 645 Double Iron Bash Steel 646 rows x 7 columns Sleep Powder [ ] 1 Grass Poison Grass Fairy Ghost Fire 100.0 100.0 100.0 75.0 75.0 90.0 100.0 100.0 100.0 100.0 ..…. Description A physical attack in which the user charges an... NaN The user growls in an endearing way, making op... The target is struck with slender, whiplike vi... 45.0 NaN The user scatters a cloud of poisonous dust th... The user scatters a big cloud of sleep-inducin... NaN 40.0 E24. You may have noticed that several of the columns in the moves data-set contain a bunch of NaN values. Call isna().sum() on the DataFrame to count the number of Nan values in each column. This will give us a better idea as to where the holes (NaN values) are in the data- set. 100.0 5 130.0 NaN 10 90.0 NaN 5 150.0 100.0 100.0 15 30.0 5 60.0 The user unleashes a strong beam. The attack's... The user hides in the target's shadow, steals ... The user attacks everything around it by causi... The user attacks with electrically charged fis... The user rotates, centering the hex nut in its... E25. Use the fillna function to replace all of the NaN values in the DataFrame with 0.
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply