Skip to content

Data Science — Pandas Practice for Central Execution Trading

Practice notebooks for pandas data manipulation, tailored to a central execution trading role.

Notebooks

Reference

How to use

  1. Open a notebook in VS Code or Jupyter.
  2. Run the Setup cell first, then each Synthetic Data cell before its section.
  3. Each exercise is a markdown prompt followed by an empty code cell — write your answer there.
  4. The advanced notebook's capstone includes expected numeric ranges for sanity-checking (not full solutions).

Prerequisites

  • Python 3.8+
  • pandas ≥ 1.5, numpy ≥ 1.21
  • Basic familiarity with DataFrames and Series (for intermediate); groupby/rolling/merge (for advanced)

Topics covered

  • Core DataFrame/Series ops — indexing, filtering, dtypes, missing data, sorting, string ops
  • GroupBy & aggregation — multi-key grouping, transform, filter, pivot/melt, crosstab
  • Time series & rolling — DatetimeIndex, resample, rolling/expanding, shift, EWMA, tz handling
  • Merging & joining — merge types, concat, join, merge_asof for trade/bar alignment
  • Order book / microstructure — L1/L2 snapshots, spread, mid-price, VWAP/TWAP, slippage, OFI, realized spread
  • Performance & optimization — vectorization, eval/query, categoricals, downcasting, memory profiling, chunked processing

All datasets are generated synthetically in-notebook — no external files required.