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.
What's the name of the series contained in the market_cap
variable?
What's the name of the series contained in the symbols
variable?
What's the dtype of the series contained in the market_cap
variable?
What's the dtype of the series contained in the symbols
variable?
How many elements both series contain?
Find the average value for Market Cap, and enter it WITHOUT decimals. Just the integer number (if you find the average is 1948.88
, just enter 1948
).
Find the median value for Market Cap, and enter it WITHOUT decimals. Just the integer number (if you find the median is 1948.0
, just enter 1948
).
Warning! The companies might be out of order... so the 88th company in symbols
might not be the same as the 88th one in market_cap
. We need you to find the 88th company in symbols
first, and then the the Market Cap from market_cap
for that particular symbol.
There's a common term in investing (and in tech) which is FAANG companies. This refers to "big tech" companies by their acronyms. For example, FAANG
means the following companies: Facebook Apple Amazon Netflix and Google
(read more about FAANG and Big Tech in Wikipedia).
Your task is to create a new series, under the variable faang_market_cap
, containing the market cap of the following companies:
Amazon.com Inc
Apple Inc.
Microsoft Corp.
Alphabet Inc Class A
(this is Google's main stock)Facebook, Inc.
Netflix Inc.
Important! The stocks must be in THIS order. You will need to find the Symbols of the companies first.
Also important, as stated above, you MUST create a variable containing your new series. Your code should look something like:
faang_market_cap = ... # your code
There's a way to combine everything in a one-liner. Try to solve this task without looking at the solution; but after you've finished it, take a peak at it because there's a neat trick explained at the end of the solution.
The S&P500 index contains 500 companies. Create a variable position_companies
that contains the market cap of the companies in the positions:
* 1st
* 100th
* 200th
* 300th
* 400th
* 500th
Important! This selection should be done under market_cap
. Don't use symbols
for this particular activity.
Use the symbols
series to sort the symbols in lexicographical order (ascending). Which company (the name, the index value) appears in the 4th position?
Note: the answer is the full company name. For example, the full name of MSFT
(Microsoft) is Microsoft Corp.
, as it appears in the index. The correct answer would be Microsoft Corp.
. By the way, Microsoft is definitively NOT the correct answer.
Using the market_cap
series, sort the companies by their symbol in lexicographical order in descending mode and enter the revenue of the 7th company.