Data Science — Pandas Practice for Central Execution Trading¶
Practice notebooks for pandas data manipulation, tailored to a central execution trading role.
Notebooks¶
pandas-intermediate-practice.ipynb— Intermediate: Core ops, GroupBy, time series, merging, order book intropandas-advanced-practice.ipynb— Advanced: Multi-index, volume-time bars, microstructure, performance, capstone- Notebook answers: intermediate and advanced
Reference¶
- Pandas cheatsheet — concise pandas reference
How to use¶
- Open a notebook in VS Code or Jupyter.
- Run the Setup cell first, then each Synthetic Data cell before its section.
- Each exercise is a markdown prompt followed by an empty code cell — write your answer there.
- 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_asoffor 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.