# convtools

A Python library for declaring data transformations, such as pipes, filters, joins, group-bys and window functions, as plain Python expressions that compile at runtime into small, optimized native functions.

convtools lets a developer express a data transformation as a composition of expressions and then compile it, with `.gen_converter()`, into a real Python function, so data stays in native iterables such as lists, dicts, generators or CSV streams rather than a dataframe container. Its Table helper processes CSV-like data without loading it all into memory.

Aggregations are handled by a set of built-in reducers, exposed as `c.ReduceFuncs.*`, covering value reducers such as Sum, Average, CountDistinct and TopK and dictionary reducers that aggregate into per-key dictionaries; nested aggregations and custom two-argument reducers are also supported.

The generated code can be printed for inspection with a debug flag, and global options are set through an options context, which works with standard Python debuggers. It is intended as a lean, composable layer for custom transforms, used alongside pandas or Polars rather than as a replacement for them.

Website: https://convtools.readthedocs.io
