Utils

Contents

Utils#

Generally useful functions used across the library. Some are also helpful when writing custom variable definitions or post-processing cohort data.

Overview#

Submodule

Contents

Time Primitives

TimeAnchor, TimeWindow, WindowRelation, WindowOverlap — time-bound primitives used throughout variable extraction.

DataFrame Utilities

DataFrame conversion (Polars ↔ Pandas ↔ Stata), time-series joins, value cleaning, aggregation helpers.

Extraction Helpers

Low-level variable-extraction helpers: filtering, aggregation, time-window expressions, time-series cleaning, merge_consecutive.

TableOne Export

Export a TableOne object to LaTeX, Markdown, HTML, or PDF.

Logging

Logger configuration, custom formatters, and structured log helpers.

Debug

Debug-info printers for filing GitHub issues.