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 series under the variable my_series
that contains three elements:
a
> 9
b
> 11
c
> -5
The name
of your Series should be "My First Series"
The series should look like this:
Select the revenue of Intel
and store it in a variable named intel_revenue
:
Select the revenue of the "second to last" element in our series s
and store it in a variable named second_to_last
.
Use multiple label selection to retrieve the revenues of the companies:
Store the result in the variable sub_series
. Important! The values must be in that order.
What's the average revenue of the companies contained in the variable american_companies
? Enter the whole number (that is, without decimals).
Enter the value as a whole number
Using all the companies (stored in the Series in s
), which company has the largest revenue?
Using all the companies (stored in the Series in s
), which name is the "first" one in lexicographic (or alphabetical) order. That is, aa
comes before than ab
.
Create a new variable american_companies_desc
that contains the results of sorting american_companies
by revenue (this is, by value) in descending order.
Now it's time to do what we told you NOT to do, but we need practice it.
There's a new series defined named international_companies
. Your task is to sort them by Revenue in descending order (larger to smaller) but doing it in place, that is, modifying the series.
If you make a mistake, you can always re-run the cell that generates the Series.
Insert a new element in our series s
, Amazon with a total revenue of: $469,822 (million dollars).
Remove the entry for Meta from the series s
.