# Question 9: Assign the variable strongest_steel to a Series that corresponds to the Primary Steel Type Pokemon with # the highest attack stat. There is a 1-line maximum to complete this task strongest_steel=df.loc[df[df['Primary Type']=='Steel']['Attack'].idxmax()] print(strongest_steel) # Question 10: Assign the variable strongest_by_type to a DataFrame that corresponds to the Pokemon with the Highest # Total Stat count for each Primary Type. There is a 1-line maximum to complete this task # Bonus: Cynthia is the Strongest Trainer in the Sinnoh Region and in order to defeat her you need to optimize # your team of 6 pokemon i.e all your 6 pokemon need to have the maximum value for each desired stat and be of the # optimal type. # Her Spiritomb is weak to Fast Fairy Type Pokemon # Her Roserade is weak to Attacking Psychic Type Pokemon # Her Togekiss is weak to Defensive Rock Type Pokemon # Her Lucario is weak to Special Attacking Ground Type Pokemon # Her Milotic is weak to Attacking Grass Type Pokemon # Her Garchomp is weak to Special Defensive Ice Type Pokemon # Assign a DataFrame called optimal_team that includes the 6 Pokemon that meet the specifications above.
You've reached the end of your free preview.
Want to read both pages?
- Spring '12