Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

data science for coursera DS Course, Exercises of Data Acquisition

data science for coursera DS Course

Typology: Exercises

2022/2023

Uploaded on 04/22/2024

garima-samraik
garima-samraik 🇮🇳

3 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1

Partial preview of the text

Download data science for coursera DS Course and more Exercises Data Acquisition in PDF only on Docsity!

®m oe 0 ® eo 9 Question 1: Use yfinance to Extract Stock Data iS Foal fase! < messuenng Reve °o flab / P02 2 ee OEE Q Ca ee © wypeheretosearen ane Using the Ticker function enter the ticker symbol af the stock we want to extract data on to create a ticker object. The steck i Tesla andl is ker symbo! is TSLA. seslentsriebectT51822 Using the ticker object and the function Adstory extract stocé infermation and save it ina datatrame named tesla date Set the period parameterto max so we g2tnfomation for the maximum amount of time Open High Law lne_—Volume Dividends Stock pte Fuse Me 6007) 540 ove Conmand Wu cal/s iyi (Una) Te Aumann 0D St RorssPasie 8 Fuh O ~ o Reset the indax using he reset_index(inptacesTrus) fonction on the tesla dala DataFrame and dsply the fist five tows of the tesla date datstame using the head function. Takes screenshot of the resus and cade from she beginning of Question 10 the results be ov Date Open High tow Case Wolume Dividend Stock Sits 5076 rows» columns Gorman) @ rca aah ASC Nontecouy AB EOB OH OG PO, MB