All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.
All our activities include solutions with explanations on how they work and why we chose them.
Create a Boolean Array that will select only the Japanese companies in our Series:
Store the array in the variable
Using that same array, select the companies from the Series and store them in a different variable named
Select those companies that have a revenue value less than
90,000, select them in a new variable named
Select those companies that have a revenue value greater than
150,000, select them in a new variable named
Use conditional selection and boolean operators to select the two companies with the MOST and LESS revenue. Store the results in the variable
most_and_less_rev. Try to use the
.min() methods of the series.
Visually, it should be:
Note: you could solve this activity using
s.loc[["Apple", "Panasonic"]], but that is, obviously, not the point of this activity. Please make sure you're using comparison and boolean operators.
Perform a selection of those companies who's revenue is between $80,000M and $150,000. Store the results of your selection in the variable:
Visually, you should select the following companies: