Course modules
19 modules over 10 daysParticipants can configure a Python workspace and produce readable code using agreed conventions.
- Python interpreter workflow, scripts, notebooks, REPL, and virtual environments
- PEP 8 naming, imports, whitespace, docstrings, and module layout
- Variables, built-in types, identity, mutability, and assignment semantics
- Formatted strings, numeric operators, comparisons, and Boolean expression evaluation
- Inspecting objects with type(), dir(), help(), and interactive documentation
- Installing packages with pip and recording dependencies in requirements files
Participants can express business rules through clear conditional and iterative program logic.
- Conditional branches using if, elif, else, and guard clauses
- for loops, while loops, break, continue, and loop else clauses
- Truthiness, short-circuit evaluation, and compound Boolean decision rules
- Enumerate, zip, range, and reversed for indexed iteration
- Match statements for structured classification and dispatch logic
- Tracing execution paths with print statements and debugger breakpoints
Participants can select and manipulate Python collection types for analytical tasks.
- Lists, tuples, sets, and dictionaries matched to data requirements
- List comprehensions with filters, expressions, and nested iteration
- Dictionary methods for grouping, lookup, counting, and accumulation
- Set operations for duplicate detection, membership, and data comparison
- Sorting records with key functions, lambda expressions, and stability
- Unpacking sequences and dictionaries for clearer assignment statements
Participants can design reusable functions with clear inputs, outputs and responsibilities.
- Function signatures, positional arguments, keyword arguments, and default values
- Return values, side effects, and single-responsibility function design
- Type hints for parameters, return values, collections, and optional values
- Input validation using assertions, explicit checks, and meaningful errors
- Scope rules, closures, global variables, and dependency passing
- Refactoring repeated code into small testable business-rule functions
Participants can organise Python code into importable modules and manageable project structures.
- Module imports, aliases, namespaces, and the __main__ execution guard
- Package directories, __init__.py files, and relative import rules
- Project structures separating source code, tests, data, and documentation
- requirements.txt files, version pinning, and reproducible package installation
- Standard library modules including pathlib, datetime, collections, and statistics
- Configuration values separated from source code using environment variables
Participants can read, write and validate common business data file formats.
- Pathlib paths for portable file discovery, creation, and directory traversal
- Context managers for safe file opening, closing, and encoding control
- CSV reading and writing with csv.DictReader and csv.DictWriter
- JSON serialisation, deserialisation, nested objects, and schema inspection
- Date parsing with datetime, strptime, timezone awareness, and ISO 8601
- Data validation checks for missing fields, formats, ranges, and duplicates
Participants can diagnose failures and build traceable error-handling into Python scripts.
- Traceback reading to locate exception types, files, lines, and causes
- try, except, else, and finally blocks for controlled recovery
- Raising ValueError, TypeError, and custom exceptions for invalid inputs
- Logging levels, handlers, formatters, and persistent execution records
- Breakpoint debugging with pdb, variable inspection, and step execution
- Defensive programming for missing files, malformed records, and failed connections
Participants can model related data and behaviour using classes and dataclasses.
- Classes, instances, attributes, methods, and constructor responsibilities
- Dataclasses for concise records, default values, and type annotations
- Encapsulation through properties, validation methods, and controlled state
- Inheritance, composition, and protocol selection for related behaviours
- Special methods including __repr__, __str__, __eq__, and ordering
- Domain models for transactions, customers, cases, and service records
Participants can create automated tests and review Python code against maintainability criteria.
- pytest test discovery, test naming, assertions, and failure interpretation
- Fixtures for repeatable test data, setup, teardown, and dependencies
- Parametrized tests covering valid inputs, boundaries, and error conditions
- Mocking external services, files, and time-dependent behaviour
- Code review criteria covering readability, duplication, exceptions, and documentation
- Static checks with ruff formatting, linting, and import validation
Participants can perform efficient numerical operations using NumPy arrays and vectorisation.
- NumPy arrays, dtypes, shapes, dimensions, and broadcasting rules
- Vectorised arithmetic replacing repeated Python loops over numeric data
- Boolean masks for filtering values, flags, and conditional calculations
- Aggregation functions for totals, averages, percentiles, and missing values
- Indexing, slicing, reshaping, stacking, and array dimension management
- Random number generation for sampling, simulation, and test datasets
Participants can load, inspect and prepare tabular data with pandas DataFrames.
- DataFrame creation from CSV, Excel, dictionaries, and SQL query results
- Data types, indexes, column selection, and row filtering methods
- Missing-value treatment using isna, fillna, dropna, and documented rules
- String cleaning with str methods, regular expressions, and normalisation
- Datetime conversion, period grouping, and time-based filtering operations
- Duplicate identification using duplicated, drop_duplicates, and business keys
Participants can transform raw records into analysis-ready tables and measures.
- assign and pipe methods for readable multi-step transformation workflows
- Groupby aggregations for counts, sums, means, and custom measures
- merge operations using keys, join types, validation, and mismatch checks
- Pivot tables for cross-tabulated metrics, subtotals, and reporting views
- Melt and explode operations for normalising wide and nested datasets
- Window calculations using shift, rolling, rank, and cumulative methods
Participants can investigate patterns and communicate findings through appropriate visualisations.
- Descriptive statistics for distribution, central tendency, spread, and outliers
- Correlation analysis, confounding cautions, and appropriate interpretation limits
- Matplotlib charts for trends, comparisons, distributions, and category rankings
- Chart labelling, scales, annotations, and colour choices for readable reporting
- Outlier investigation using quantiles, IQR rules, and source-record checks
- Analytical narrative linking question, method, evidence, limitations, and action
Participants can retrieve and combine relational data through parameterised SQL queries.
- Relational tables, primary keys, foreign keys, and normalised structures
- SELECT queries with WHERE, ORDER BY, LIMIT, and calculated columns
- INNER JOIN, LEFT JOIN, aggregation, HAVING, and duplicate diagnosis
- Parameterised queries preventing SQL injection and preserving data types
- sqlite3 connections, cursors, transactions, and context-managed database access
- Loading query results directly into pandas DataFrames for analysis
Participants can request, validate and process data from JSON REST APIs.
- HTTP methods, status codes, headers, query parameters, and request bodies
- requests library calls with timeouts, retries, and error handling
- Authentication patterns using API keys, bearer tokens, and environment variables
- JSON response traversal, pagination, nested records, and schema changes
- Rate-limit handling with backoff, caching, and request logging
- API data validation before merging with internal analytical datasets
Participants can identify common performance bottlenecks and improve data-processing efficiency.
- Profiling functions with timeit, cProfile, and focused performance measurements
- Algorithmic complexity expressed through Big O time and space costs
- Generator expressions and yield for memory-efficient sequential processing
- Chunked CSV processing for files exceeding available memory capacity
- Vectorisation choices compared with apply, iterrows, and Python loops
- Caching repeated calculations with functools.lru_cache and controlled invalidation
Participants can structure an analytical workflow that others can rerun and review.
- Analysis folders separating raw data, processed data, code, outputs, and notes
- README documentation covering purpose, setup, inputs, assumptions, and execution
- Data dictionaries defining fields, types, permitted values, and ownership
- Version control concepts: commits, branches, diffs, merges, and review history
- Configuration files for paths, dates, thresholds, and environment-specific settings
- Reproducibility checks confirming identical inputs produce expected output files
Participants can plan an end-to-end Python solution for a defined analytical requirement.
- Problem framing with stakeholders, decisions, users, metrics, and acceptance criteria
- Source-data assessment covering provenance, quality, access, and refresh frequency
- Transformation plan mapping raw fields to validated analytical measures
- Function and module design for ingestion, validation, analysis, and reporting
- Test plan covering business rules, boundary conditions, and exception paths
- Output specification for tables, charts, files, logs, and user documentation
Participants can build, review and present a complete documented Python analytics project from source data to decision-ready outputs.
- Build a Python project importing, validating, transforming, and analysing source data
- Apply functions, classes, pandas workflows, and exception handling appropriately
- Create pytest tests for calculations, data rules, and failure conditions
- Generate tables and visualisations answering defined stakeholder questions clearly
- Conduct peer code review using PEP 8, documentation, and test evidence
- Present findings, limitations, assumptions, and handover instructions to reviewers
Exercises and examples are adapted to each cohort's sectors and roles.








