Name the outlier
You've identified that a company in the Industrial Technology sector has a P/E ratio of greater than 50. Let's identify this company.
numpy
is imported as np
, and arrays it_pe
(P/E ratios of Industrial Technology companies) and it_names
(names of Industrial Technology companies) are available in your workspace.
This exercise is part of the course
Introduction to Python for Finance
Exercise instructions
- Identify the P/E ratio greater than 50 and assign it to
outlier_price
. - Identify the company with P/E ratio greater than 50 and assign it to
outlier_name
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Identify P/E ratio within it_pe that is > 50
outlier_price = it_pe[____ > 50]
# Identify the company with PE ratio > 50
outlier_name = it_names[____]
# Display results
print("In 2017, " + str(outlier_name[0]) + " had an abnormally high P/E ratio of " + str(round(outlier_price[0], 2)) + ".")