Tutorials

Tutorials

Practical, hands-on tutorials and how-to guides on Python, Pandas, NumPy, SQL, and setting up your data-science environment.

Python

scikit-learn Overview: One fit/predict API for Every Model

A wider tour of scikit-learn than one worked example can give you: the shared fit/predict/transform pattern behind every estimator, a classifier and a preprocessing transformer side by side, and how Pipeline chains them into one reusable object.

July 3, 2026 · 11 min read ·By Mehdi Lotfinejad Read tutorial →
SQL SQL Triggers: A Practical Guide to Event, Timing, Action A trigger is code the database runs for you, automatically, whenever a row changes. This guide builds the event-timing-action mental model, then works through BEFORE and AFTER triggers, an audit log, and the traps that catch people the first time, all in SQLite. Jul 3, 2026 9 min read Read tutorial Python Text Classification with spaCy: A Practical Beginner's Guide Build a working spam/ham text classifier with spaCy's TextCategorizer, from a blank pipeline through a real training loop to a proper precision/recall evaluation on held-out messages. Jul 3, 2026 11 min read Read tutorial Python Web Scraping with Scrapy: Building a Spider from Scratch A hands-on walkthrough of Scrapy's core pieces — spiders, selectors, Items, and pipelines — building a small price-watch project against a real practice site, one runnable step at a time. Jul 3, 2026 10 min read Read tutorial Python Your First Machine Learning Model: A Hands-On scikit-learn Tutorial A complete first pass at supervised learning: explore a real health dataset with pandas, chart a relationship with matplotlib, split it honestly, and train and grade a scikit-learn regression model. Jul 3, 2026 10 min read Read tutorial Python Pandas GroupBy: A Practical Guide to Split, Apply, Combine Every 'per-group' question in Pandas goes through groupby. This guide builds the split-apply-combine mental model, then works through agg, named aggregations, multi-column grouping, transform, and filter on a small dataset you can regenerate yourself. Jul 2, 2026 7 min read Read tutorial Python Python's match Statement: Cleaner Code with Structural Pattern Matching The match statement is one of Python's most underused features. See how it replaces messy if/elif chains and, more importantly, how structural pattern matching lets you match the shape of your data and pull out the parts you need. Jun 28, 2026 6 min read Read tutorial Python Managing Python Projects with Poetry: A Practical Guide Outgrown venv and requirements.txt? Poetry handles dependencies, virtual environments, lockfiles, and packaging from a single pyproject.toml. A practical, end-to-end guide with real commands. Jun 27, 2026 7 min read Read tutorial SQL Loading CSV Data into PostgreSQL: COPY vs INSERT, Benchmarked Connecting to Postgres from Python is the easy part. This guide builds a table with psycopg2, loads a CSV row by row and then in bulk with COPY, and measures the real speed difference between them on 8,000 rows. Jul 3, 2026 11 min read Read tutorial Python Fast, All-in-One Python Project Management with uv uv is a single, blazing-fast tool that handles virtual environments, dependencies, lockfiles, Python versions, and packaging. A practical guide to the toolchain replacing pip, venv, and pyenv. Jun 27, 2026 6 min read Read tutorial
Sponsor

Keep DATATWEETS free. Help fund practical data, AI, and engineering lessons for learners worldwide.

Buy Me a Coffee at ko-fi.com