{"id":21401,"library":"grizz","title":"grizz","description":"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.","status":"active","version":"0.1.1","language":"python","source_language":"en","source_url":"https://github.com/durandtibo/grizz","tags":["polars","data-preprocessing","transformers","etl"],"install":[{"cmd":"pip install grizz","lang":"bash","label":"Latest release"}],"dependencies":[{"reason":"Core dependency for DataFrame operations","package":"polars","optional":false},{"reason":"Required for Arrow integration","package":"pyarrow","optional":false}],"imports":[{"note":"Transformer classes are in the 'transformer' submodule","wrong":"from grizz import CastTransformer","symbol":"CastTransformer","correct":"from grizz.transformer import CastTransformer"},{"note":"Use top-level transformer import","wrong":"from grizz.transformer.cast import InPlaceCastTransformer","symbol":"InPlaceCastTransformer","correct":"from grizz.transformer import InPlaceCastTransformer"},{"note":"Moved to core transformer module as of v0.0.3","wrong":"from grizz.transformer.ts import ToDatetimeTransformer","symbol":"ToDatetimeTransformer","correct":"from grizz.transformer import ToDatetimeTransformer"}],"quickstart":{"code":"import polars as pl\nfrom grizz.transformer import CastTransformer\n\ndf = pl.DataFrame({'a': ['1', '2'], 'b': ['3.0', '4.0']})\ntransformer = CastTransformer(columns=['a'], dtype=pl.Int64)\nresult = transformer.fit_transform(df)\nprint(result)","lang":"python","description":"Create a Polars DataFrame and apply a CastTransformer to cast column 'a' to Int64."},"warnings":[{"fix":"Replace `period` with `interval` in transformer constructors.","message":"In v0.0.5, the `period` parameter was renamed to `interval` in several transformers (e.g., CumSumTransformer, CumMeanTransformer). Code using `period` will break.","severity":"breaking","affected_versions":">=0.0.5"},{"fix":"Update imports: `from grizz.transformer import ToTimeTransformer`.","message":"The `ToTimeTransformer` and `ToDatetimeTransformer` were moved from `grizz.transformer.ts` to `grizz.transformer` in v0.0.3. Old imports will fail.","severity":"breaking","affected_versions":">=0.0.3"},{"fix":"Convert pandas DataFrame to Polars using `pl.from_pandas(df)` before passing.","message":"Transformer base class methods `transform` and `fit_transform` expect Polars DataFrames. Passing pandas DataFrames will raise a TypeError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from grizz.transformer import ToDatetimeTransformer` instead.","cause":"The `ts` submodule was removed in v0.0.3 when temporal transformers were moved up.","error":"ModuleNotFoundError: No module named 'grizz.transformer.ts'"},{"fix":"Wrap the column name in a list: `columns=['col_name']`.","cause":"Passing a single string to `columns` instead of a list.","error":"TypeError: 'columns' must be a list of strings"},{"fix":"Ensure all values in the column are numeric, or use `FloatCastTransformer` for floats.","cause":"Casting a non-numeric string to an integer type.","error":"polars.exceptions.ComputeError: conversion from `str` to `i64` failed"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}