Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Python for Data Science — a hands-on tutorial

A step-by-step path from core Python to the foundations of data science. Built from real coursework and reworked into a practical, DataCamp-style tutorial.

Every topic folder has the same three things:

  1. README.md — a short, exam-focused explanation of the concept.
  2. A real program — a complete, runnable app, not a toy snippet.
  3. exercises.py + solutions.py — fill-in-the-blank practice (replace each ____), with a self-check (PASS/FAIL) and reference answers.

All code is Python 3, reproducible (no user input, seeded randomness), and tested.

Part 1 — Python programming

# Topic What you master Project you build
01 Fundamentals variables, conditions, loops, functions Password authenticator
02 Data structures lists, tuples, dictionaries, sets Contact book
03 OOP classes, objects, inheritance Bank account system
04 Advanced Python iterators, generators, decorators Log streamer + timer
05 Error handling exceptions, custom exceptions Resilient data parser
06 File handling text, CSV, JSON, file ops Expense tracker (saves to disk)
07 Development virtual environments, pip, packages Installable textkit package
08 Engineering modules, project structure, logging Structured, logged project

Part 2 — Data science

# Topic What you master Built on
09 NumPy arrays, vectorization, masking, aggregations —
10 pandas DataFrames, selecting, cleaning, EDA students.csv (200 rows)
11 Statistics & viz descriptive stats, histogram/box/scatter students.csv
12 Intro ML linear regression (from scratch + scikit-learn) students.csv

Modules 10–12 share one dataset (students.csv, generated by 10_pandas/make_dataset.py), so the analysis builds toward a real prediction.

Setup

python -m venv venv
venv\Scripts\activate         # Windows
# source venv/bin/activate    # macOS / Linux
pip install -r requirements.txt

Modules 01–08 need only the standard library; 09–12 use NumPy/pandas/matplotlib/scikit-learn.

How to use a module

cd 01_fundamentals
python authenticator.py     # see the real program run
python exercises.py         # fill the blanks, then run to self-check
python solutions.py         # the reference answers

Work the modules in order — each assumes the ones before it.

Applied projects

After the lessons, projects/ holds small end-to-end programs that apply what the modules teach. Unlike the lesson code these are interactive / use live data.

Project Applies Run
projects/number_guessing Module 01 (loops, conditionals, random) python game.py
projects/rock_paper_scissors Modules 07–08 (modules, structure) python main.py
projects/temperature_forecaster Modules 05 & 07 (errors, requests, APIs) python main.py

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages