janitor-rs

raw JSON →
0.6.1 verified Mon Apr 27 auth: no python

A Rust-powered data cleaning and preprocessing library for pandas DataFrames. Provides fast implementations of common janitor functions like clean_names, remove_empty, get_dupes, and more. Version 0.6.1. Release cadence: irregular.

pip install janitor-rs
error ModuleNotFoundError: No module named 'janitor_rs'
cause pip installed 'janitor-rs' but import uses underscore.
fix
pip install janitor-rs, then import janitor_rs
error AttributeError: 'DataFrame' object has no attribute 'clean_names'
cause In version 0.6.x, methods are no longer attached to DataFrame objects.
fix
Use df.pipe(janitor_rs.clean_names)
breaking janitor-rs 0.6.1 dropped the .clean_names attribute on DataFrame; must use df.pipe(janitor_rs.clean_names).
fix Use pipe pattern instead of method chaining.
gotcha janitor-rs functions do not modify DataFrames in place; they return new DataFrames.
fix Assign the result: df = df.pipe(janitor_rs.clean_names).
deprecated import janitor_rs as jn is common but may conflict with pyjanitor's jn alias.
fix Use import janitor_rs or use alias jrs.

Import janitor_rs, then use pipe to apply functions to a DataFrame.

import pandas as pd
import janitor_rs
df = pd.DataFrame({'A a': [1, None], 'B b': [2, 3]})
clean_df = df.pipe(janitor_rs.clean_names)
print(clean_df.columns.tolist())