Request
Add support for Polars DataFrames alongside the existing pandas implementation,
So users working in Polars-native pipelines can use tsauditor without converting
to pandas first.
Current state
tsauditor is currently pandas-native throughout. Every module assumes:
- a
pd.DataFrame input
- a
pd.DatetimeIndex as the time index
- pandas-specific operations (
.rolling(), .diff(), .groupby(), .iloc[])
What this would involve
At minimum, one of:
- A conversion layer at the
scan() entry point that accepts a Polars DataFrame
and converts to pandas internally before passing to modules
- A parallel Polars-native implementation of each audit module
The conversion-layer approach is simpler and probably the right starting point.
It keeps the core detection logic unchanged while broadening input compatibility.
Notes for contributors
This is a non-trivial addition. A good starting point would be:
- Opening a discussion comment here on the preferred approach (conversion vs native)
- Adding
polars as an optional dependency in pyproject.toml
- Implementing and testing the conversion layer in
tsauditor/utils/validation.py
where input validation already lives
If you're interested in taking this on, comment here so we can avoid duplicate work.
Request
Add support for Polars DataFrames alongside the existing pandas implementation,
So users working in Polars-native pipelines can use tsauditor without converting
to pandas first.
Current state
tsauditor is currently pandas-native throughout. Every module assumes:
pd.DataFrameinputpd.DatetimeIndexas the time index.rolling(),.diff(),.groupby(),.iloc[])What this would involve
At minimum, one of:
scan()entry point that accepts a Polars DataFrameand converts to pandas internally before passing to modules
The conversion-layer approach is simpler and probably the right starting point.
It keeps the core detection logic unchanged while broadening input compatibility.
Notes for contributors
This is a non-trivial addition. A good starting point would be:
polarsas an optional dependency inpyproject.tomltsauditor/utils/validation.pywhere input validation already lives
If you're interested in taking this on, comment here so we can avoid duplicate work.