Partial preview of the text
Download data science for coursera DS Course and more Exercises Computer Science in PDF only on Docsity!
[Stricemenine x) * [Retichere | PEED OY + om cow + wo marine 8 Fuh O ‘le ° Question 3: Use yfinance to Extract Stock Data ° * - waco Using the Tekan function enter th eer symbol of the stock ne want o esac data on to ceate ale abject. The tek D |e entice GameStop and sticker sybol is ME 4D fm MeoSoreping_Revien, shove wz — Using the ticker object and the function Astory extract soc’ infermation ad save it ina datftame named gne_data Set the erie parameter to max so we gatinformstion far he maximum amount af tive jos cane tara date hitorV(paads PD) ‘Open High Low Cove Volume Dividend Steck Spt © raya Fyn [ke Me 607 54700 Vote Command © Ut cant gis Un ai Taher 0D. A SEC Most douly A EO 0 550, Brmisernenipne | [omy a Ot XB ta oO ot teenie 8 Fuh O ‘BBE owe «7 clumn ‘lo a) Reset the index using @ Andex(inplaceeTrue) function on the gme_daca DataFrame and csply the fst five rus of Jatsfame using the head function. Take a screenshot ofthe resus and code from the beginning f Question 3 to te months gp the ene_data the results below om ro se eats teat sacn(Saplecntrue) (pe wessering Rees shave os < @ 9G omar He TaOIN VeREO Tene LemieH Het Question 4: Use Webscraping to Extract GME Revenue Data Use te requests rary: download tie webpage htps:/ storage appdemain cloud/IBMDeveloperSklsNetonk PYOZOUN Sil ‘esponse as avaiable navsed hew_data a 3 uscloud-obj worabsiprojet/stocchm, Save the text ofthe Pye0uR sat ehctonk ove Cormand © ti cal2) iyi (Ui ate} Tre Aarons 0 DL © wypeheretosearen A SEC Most douly A EO 0 550,