python project for data science coursera week 1 quiz answers
Extracting Stock Data Using a Python Library
1. From the lab exercise, in which country is AMD (Advanced Micro Devices) situated?
- China
- Canada
- United States
2. In the lab exercise, to which sector does AMD (Advanced Micro Devices) belong?
- Electronics
- Agriculture
- Technology
3. In the lab exercise, what is the Volume of AMD traded on the first day (first row)?
- amd_share_price_data = amd.history(period=”max”)
amd_share_price_data.max()
Extracting Stock Data Using a Web Scraping
4. In the lab exercise, what is the content of the title attribute from the object soup?
- <title>Amazon.com, Inc. (AMZN) Stock Historical Prices & Data – Yahoo Finance</title>
- (AMZN) Stock Historical Prices & Data – Yahoo Finance
- <b class=”Hidden”>Yahoo Finance</b>
5. In the lab exercise, what are the correct names of the columns of the dataframe?
- ‘Date’, ‘Open’, ‘High’, ‘Low’
- ‘Date’, ‘Open’, ‘High’, ‘Low’, ‘Close’, ‘Volume’, ‘Adj Close’
- ‘Date’, ‘Open’, ‘High’, ‘Low’, ‘Close’, ‘Volume’, ‘Adj Close’, ‘max’,’min’
6. In the lab exercise, what is the Open of the last row in the amazon_data dataframe?
- 3,242.36
- 717.32
- 656.29