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.
The column Revenue
is expressed in millions of dollars. Create a new one, Revenue in $
with the values for revenue expressed in $US Dollars (single units).
Create a new boolean column Is American?
that contains the value True
for companies which Country is USA
, and False
otherwise.
Create new column CEO
that contains the names of the CEOs of each company. You'll find the list of the CEOs in the associated notebook.
Using the del
keyword, delete the column CEO
.
Using .drop
, delete Microsoft and assign the result to df_no_windows
. IMPORTANT, you should NOT modify df
.
Perform a mutable operation and delete the rows containing information for IBM
and Dell Technologies
.
Drop the companies that have a value of Revenue
lower than the mean (average Revenue
). Do NOT modify the original DataFrame; store the new results in df_high_revenue
.
Drop the companies whose country is NOT USA
. Store the results in the variable df_usa_only
.
Use chaining methods to first drop all the companies that are NOT Japanese, and, in the same expression, sort them by Revenue in descending order.