Python Tutorials

🐍

PYTHON

Python for Data Engineers

Variables to pandas, OOP to decorators, APIs to testing, packaging to cloud SDKs — the complete Python path.

31 in-depth tutorials

01Variables, Data Types, and Type Conversion

Variables, data types, memory model, namespaces, and how Python stores data internally.

02Strings

Complete Python strings guide. Creating strings (single, double, triple quotes, raw strings), strings in memory and why they are immutable (with id proof), positive and negative indexing, slicing with step parameter…

03Lists

Complete Python lists guide. Creating lists (empty, single, constructor), lists in memory (store references not values), mutability with id proof, positive and negative indexing, slicing with step parameter, slice…

04Tuples, Sets, and Frozensets

Complete guide to Python tuples, sets, and frozensets. Creating tuples (single-element trap), immutability (why it matters, mutable object inside a tuple), indexing, slicing, unpacking with *, named tuples, tuples in…

05Dictionaries

Complete Python dictionaries guide. Creating dicts (6 methods including zip and fromkeys), hash tables under the hood (with slot diagram), why keys must be immutable.

06Conditionals

Complete Python conditionals guide. Basic if, if-else, if-elif-else with drive-through analogy, indentation rules. Comparison operators (==, !=, >, <, chained comparisons), is vs == (identity vs equality).

07Loops

Complete Python loops guide. for loops over sequences, strings, and dicts. range() patterns (start, stop, step, counting backwards, lazy memory).

08Functions

Complete Python functions guide. Defining and calling functions (vending machine analogy), parameters vs arguments, return values (multiple returns as tuples, implicit None, mutating functions return None convention).

09Comprehensions & Generators

Complete Python comprehensions guide. Why comprehensions exist (conveyor belt analogy).

10Lambda, map, filter, reduce

Lambda, map, filter, reduce: functional programming patterns in Python.

11File Handling

Complete Python file handling guide. Opening and closing files (the dangerous way vs context managers with hotel analogy). All file modes explained (r, w, a, x, r+, rb with decision table).

12Error Handling

Complete Python error handling guide. Syntax errors vs exceptions. Common built-in exceptions table (13 types with when and example). Exception hierarchy (BaseException vs Exception and why it matters).

13Logging

Complete Python logging guide for data engineers. Why not print() (5 reasons with side-by-side comparison). Getting started with basicConfig and named loggers.

14OOP — Classes

Complete Python OOP guide for data engineers. Why OOP when functions are not enough (scattered state problem with ID badge template analogy). Your first class (defining, creating instances, modifying state).

15OOP Advanced

Complete Python advanced OOP guide for data engineers. Inheritance basics (what gets inherited table, smartphone analogy). Parent-child class with DataSource/SQLSource/APISource examples.

16Modules, Packages & Virtual Environments

Complete Python modules, packages, and virtual environments guide for data engineers. Modules (what they are, creating your first module, all import styles with toolbox analogy).

17Dates, Times & Timezones

Complete Python dates, times, and timezones guide for data engineers. Core classes table (date, time, datetime, timedelta). date for calendar dates (today, weekday, comparison). time for time-of-day.

18Regular Expressions

Complete Python regular expressions guide for data engineers. Why regex over manual string checks.

19Decorators & Context Managers

Complete Python decorators and context managers guide for data engineers. Part 1 Decorators: functions as first-class objects (assign, pass, return). Closures with robot factory analogy.

20Working with APIs & HTTP

Complete Python APIs and HTTP requests guide for data engineers. HTTP basics (what is an API, HTTP methods table with restaurant analogy, status codes table with pipeline actions, headers and content types).

21Python for Data Engineers

The essential Python skills every data engineer uses daily.

22File Formats (CSV, JSON, Parquet, Excel)

The complete Python file formats guide for data engineers. Reading and writing CSV files with every pandas parameter explained. JSON flat, nested, and JSON Lines patterns.

23Database Connections

The complete Python database connections guide for data engineers. SQLAlchemy 2.0 engines, connection strings, and the text() function. pyodbc for SQL Server and Azure SQL. psycopg2 for PostgreSQL.

24ETL Patterns

The complete Python ETL patterns guide for data engineers. ETL vs ELT and when to use each. Building extract, transform, and load phases with pandas. Function-based and class-based pipeline architectures.

25Testing with pytest

The complete pytest guide for data engineers. Why testing matters for data pipelines. pytest basics and plain assert. Fixtures, fixture scope, yield fixtures, and conftest.py. Parametrize for testing multiple inputs.

26Concurrency

The complete Python concurrency guide for data engineers. The GIL and why it matters. CPU-bound vs I/O-bound tasks. threading for concurrent I/O. multiprocessing for true parallelism.

27Cloud SDKs (boto3, Azure, GCS)

The complete Python cloud storage guide for data engineers. boto3 for AWS S3: client vs resource, upload, download, list with pagination, read directly into pandas, presigned URLs, multipart transfers.

28Packaging & CLI Tools

The complete Python packaging and CLI tools guide for data engineers. argparse for quick command-line scripts. click for professional CLIs with subcommands.

29pandas Deep Dive

The complete pandas deep dive for data engineers. groupby with agg, transform, and filter. Named aggregations. merge and join for combining DataFrames (inner, left, right, outer, cross). concat for stacking.

30Environment Management

The complete Python environment management guide. venv and pip basics. pip-tools for lockfiles. conda for native libraries. Poetry for project management. uv as the 2026 default. Docker for production.

31Data Validation

The complete Python data validation guide. pydantic for record-level schema enforcement. pandera for DataFrame validation. Great Expectations for enterprise data quality. Schema checks, custom validators, data contracts.

Scroll to Top