This Python Project mini-course provided by IBM is intended to demonstrate basic Python skills by performing specific tasks such as extracting data, web scraping, visualizing data, and creating a dashboard. The following are the notes I took during this course.
Web Scraping
HTML Tags
- HTML Composition
- HTML Paragraph Tags:
<p></p>
- HTML Anchor Tag & Hyperlink Tag:
<a href=""></a>
- Attributes:
href=""
- Inspect HTML:
F12
- Document Tree:
<head></head>
,<body></body>
- HTML Tables:
<table><tr><td>1</td><td>2</td></tr></table>
BeautifulSoup
1 | from bs4 import BeautifulSoup |
BeautifulSoup: Object
1 | tag_object=soup.title |
BeautifulSoup: find_all
1 | table=BeautifulSoup(html, 'html5lib') |
Requests & BeautifulSoup in real web page
1 | import requests |
Project: Analyzing Stock Performance and Building a Dashboard
A stock (also known as equity) is a security that represents the ownership of a fraction of a corporation.
The stock ticker is a report of the price of a certain stock, updated continuously throughout the trading session by the various stock market exchanges.
Extracting Stock Data Using a Python Library: yfinance
Extracting Stock Data Using Web Scraping
Assignments
Visit my Github Repository