Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 650 Bytes

File metadata and controls

28 lines (19 loc) · 650 Bytes

Python Learning

Small, runnable exercises for learning Python with data-processing examples.

Current exercise: grouping and aggregation

sector_summary.py demonstrates how to:

  • group dictionaries with defaultdict;
  • ignore incomplete input safely;
  • calculate averages;
  • sort a result using a key function.

factor_basics.py adds transparent close-to-close returns and trailing moving averages. These are educational calculations for local research data, not investment advice or an automated trading system.

Run the example:

python sector_summary.py

Run the tests:

python -m unittest discover -s tests -v