هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
$ مستخدم عادي# بصلاحية root (أو مع sudo)
What the course covers
Build a small data project from start to finish with Python.
- Collect stock data with web scraping and the yfinance library.
- Read HTML tables with pandas and turn them into a DataFrame.
- Use the short squeeze dashboard idea and show the key numbers.
- Submit a notebook with code, charts, and a short written analysis.
| Module | Main focus |
|---|---|
| 1. Crowdsourcing Short Squeeze Dashboard | Web scraping, HTML, pandas tables, stock data, practice project |
| 2. Final Project | Final submission, clean analysis, wrap up |
Module 1: Crowdsourcing Short Squeeze Dashboard
Web scraping means getting data from web pages with code.
- HTML uses tags. A table has
<table>,<tr>for rows, and<td>for cells. requestsdownloads the page. BeautifulSoup reads and searches the HTML.pandas.read_htmlreads an HTML table from a page or a URL and gives a DataFrame.- yfinance is a Python library that gives stock price data.
- Create a
Tickerobject, then callhistory()to get a price table. - A DataFrame is a table with rows and columns. Rows are records, columns are features.
- Always check the data first: date range, missing values, and column types.
- Plot price and volume to see the story in the data.
- A short squeeze is a fast price jump when many short sellers must buy shares back.
- Save the work in a notebook with clear markdown notes.
Module 2: Final Project
The final project asks you to extract stock data and show it in a simple dashboard.
- A notebook has code cells and markdown cells. Use markdown to explain each step.
- Build small parts: get the data, clean it, explore it, plot it, then write the summary.
- A good chart has a title, labeled axes, and readable dates.
- Explain what you see in plain words. Do not show code only.
- Check the notebook output before you submit.
Check yourself
Answer each question first, then open it to check the answer.
1What is web scraping? a) Writing data to a database · b) Getting data from web pages with code · c) Deleting a web page · d) Drawing a chart
b) Getting data from web pages with code. Web scraping pulls data from web pages.
2Which library reads HTML tables directly into a DataFrame? a) NumPy · b) Flask · c) pandas · d) pytest
c) pandas. pandas has read_html for HTML tables.
3Which pandas call reads tables from a web page? a) pd.read_csv · b) pd.read_json · c) pd.read_sql · d) pd.read_html
d) pd.read_html. read_html returns a list of DataFrames.
4What does <tr> mean in HTML? a) A table row · b) A table column · c) A page title · d) A link
a) A table row. tr means table row. td means table cell.
5Which library does the course use to get stock prices? a) Django · b) yfinance · c) pytest · d) NumPy
b) yfinance. yfinance gives market data in Python.
6With yfinance, which object do you create first? a) A SQL cursor · b) An HTML parser · c) A Ticker object · d) A list of strings
c) A Ticker object. Make a Ticker, then ask for history.
7What is a DataFrame? a) A chart type · b) A web server · c) A Python file · d) A table with rows and columns
d) A table with rows and columns. A DataFrame is a two-dimensional table.
8What is a short squeeze? a) A fast price jump when short sellers must buy shares back · b) A slow fall in price over years · c) A database backup · d) A type of HTML tag
a) A fast price jump when short sellers must buy shares back. Short sellers buy back, and the price jumps up.
9Why use markdown cells in a notebook? a) To run the code · b) To explain the work in words · c) To store the data · d) To install packages
b) To explain the work in words. Markdown cells hold the explanation, not the code.
10You get a stock price table with dates. What should you check first? a) The color of the chart · b) The file name · c) The date range and missing values · d) The number of code cells
c) The date range and missing values. Check dates and gaps before any analysis.
11A good chart has: a) No labels · b) Many colors and no title · c) Only numbers · d) A title and labeled axes
d) A title and labeled axes. A chart needs a title and clear axis labels.
12What is the best order for the project work? a) Collect, clean, explore, plot, explain · b) Plot, then collect, then clean · c) Explain, then collect · d) Clean, then collect, then explain
a) Collect, clean, explore, plot, explain. Data comes first, then cleaning, then the story.
Study and exam tips
Do not mix read_csv, read_json, read_sql, and read_html. Each one reads a different source.
- A DataFrame is a table. A chart is a picture. Keep these two words apart.
- In HTML,
tris a row andtdis a cell. Small letters matter. - The project order is always: collect, clean, explore, plot, explain.
- Check dates and missing values before you trust any stock chart.