Install & Compatibility
Where this runs
tested against v0.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✓ 4.3s
222MB installed
● package 222MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CastTransformer
✓ from grizz.transformer import CastTransformer
✗ from grizz import CastTransformer
Transformer classes are in the 'transformer' submodule
InPlaceCastTransformer
✓ from grizz.transformer import InPlaceCastTransformer
✗ from grizz.transformer.cast import InPlaceCastTransformer
Use top-level transformer import
ToDatetimeTransformer
✓ from grizz.transformer import ToDatetimeTransformer
✗ from grizz.transformer.ts import ToDatetimeTransformer
Moved to core transformer module as of v0.0.3
Create a Polars DataFrame and apply a CastTransformer to cast column 'a' to Int64.
import polars as pl
from grizz.transformer import CastTransformer
df = pl.DataFrame({'a': ['1', '2'], 'b': ['3.0', '4.0']})
transformer = CastTransformer(columns=['a'], dtype=pl.Int64)
result = transformer.fit_transform(df)
print(result)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'grizz.transformer.ts'
The `ts` submodule was removed in v0.0.3 when temporal transformers were moved up.
fixUse `from grizz.transformer import ToDatetimeTransformer` instead.
TypeError: 'columns' must be a list of strings
Passing a single string to `columns` instead of a list.
fixWrap the column name in a list: `columns=['col_name']`.
polars.exceptions.ComputeError: conversion from `str` to `i64` failed
Casting a non-numeric string to an integer type.
fixEnsure all values in the column are numeric, or use `FloatCastTransformer` for floats.
Upgrade
Version history
0.1.1latest on PyPI · released Nov 8, 2024
Audit
Dependencies
polarsrequiredCore dependency for DataFrame operations
pyarrowrequiredRequired for Arrow integration