Registry / data / grizz
library0.1.1pypypi✓ verified 91d ago

A lightweight library for preprocessing data with Polars. Version 0.1.1 supports Python 3.9-3.13 and dependencies include Polars, PyArrow, and ClickHouse. Releases are frequent, adding transformers and temporal features.

pip install grizz
INSTALL
IMPORT
SIG · GRIZZ
G
grizz
datapythonv0.1.1
Install
4.0s avg
Import
613ms
Disk
222MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.9–3.13
musl
3.9–3.13
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
musl
glibc
py 3.10
✓ —
✓ 4.6s
py 3.11
✓ —
✓ 3.9s
py 3.12
✓ —
✓ 3.8s
py 3.13
✓ —
✓ 3.3s
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)
Debug
Known issues
breakingIn v0.0.5, the `period` parameter was renamed to `interval` in several transformers (e.g., CumSumTransformer, CumMeanTransformer). Code using `period` will break.
fix
Replace `period` with `interval` in transformer constructors.
affects: >=0.0.5
breakingThe `ToTimeTransformer` and `ToDatetimeTransformer` were moved from `grizz.transformer.ts` to `grizz.transformer` in v0.0.3. Old imports will fail.
fix
Update imports: `from grizz.transformer import ToTimeTransformer`.
affects: >=0.0.3
gotchaTransformer base class methods `transform` and `fit_transform` expect Polars DataFrames. Passing pandas DataFrames will raise a TypeError.
fix
Convert pandas DataFrame to Polars using `pl.from_pandas(df)` before passing.
affects: all
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.
fix
Use `from grizz.transformer import ToDatetimeTransformer` instead.
TypeError: 'columns' must be a list of strings
Passing a single string to `columns` instead of a list.
fix
Wrap 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.
fix
Ensure 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
Agent activity
16 hits · last 30 days
node
14
Anthropic
1
Resources
grizz — pip install grizz · libregistry