--- id: pandas-flavor version: "0.8.1" license: MIT license_treatment: permissive maintenance: active --- # pandas-flavor — The easy way to write your own Pandas flavor License: permissive · Maintenance: active · Downloads: 1.1M/mo ## What it is and what it does Pandas Flavor provides decorators to register custom methods and accessors on Pandas objects—DataFrames, Series, and GroupBy—without forking or modifying Pandas itself. Instead of writing utility functions that operate on Pandas objects from the outside, you use decorators like `@register_dataframe_method` or `@register_dataframe_accessor` to attach your functions directly to the object, so they appear as native methods or namespaced accessor attributes. The package originated to backport Pandas' extension API to older versions, but has evolved into a tool for building domain-specific Pandas extensions. It is used by projects like pyjanitor and pdvega to add specialized data-cleaning and visualization methods. The library handles the subtle work of creating accessor classes that mimic method behavior, preserving docstrings and call semantics, so your custom code integrates cleanly into Pandas workflows. Use it for: - Build a data-cleaning library that adds methods like `.clean_column_names()` or `.remove_duplicates()` directly to DataFrames. - Create domain-specific accessors (e.g., `.bio.translate()` for bioinformatics) that namespace related methods without polluting the DataFrame API. - Extend GroupBy objects with custom aggregation or transformation methods for specialized analytics workflows. - Develop internal company data tools that add proprietary methods to Pandas objects for consistent, discoverable APIs. - Register Series methods for specialized data types or transformations (e.g., `.text.clean()` for text processing). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Registers custom methods and accessors on Pandas DataFrames, Series, and GroupBy objects, extending Pandas with domain-specific functionality without modifying Pandas itself. Yes. The package is actively maintained, has no known vulnerabilities, imposes minimal install friction, and solves a real problem: extending Pandas cleanly without monkeypatching or external wrapper functions. Use it if you are building a Pandas-based library or tool that needs to add custom methods or accessors. The MIT license carries no restrictions. ## Install pip install pandas-flavor uv add pandas-flavor poetry add pandas-flavor ## Installing pandas-flavor Before you install: Low friction installation with a pure Python wheel. Active maintenance (last commit 2026-06-08, 265 days since release) and broad Python support (3.9–3.12, CPython and PyPy). Depends only on pandas and xarray, both widely available. License in practice: MIT license (permissive) imposes no restrictions on use, modification, or redistribution in proprietary or open-source projects. Quickstart: pip install pandas-flavor import pandas as pd import pandas_flavor as pf @pf.register_dataframe_method def my_method(df, col, value): return df[df[col] == value] df = pd.DataFrame({'x': [10, 20], 'y': [0, 2]}) df.my_method('x', 10) Requires Python 3.10 or later. Verify before relying: - Whether xarray is a required runtime dependency or an optional feature; the fact sheet lists it but does not clarify its role. - Scope and stability of the tracing feature introduced in 0.5.0 and how it integrates with method registration. - Whether backwards compatibility with Pandas <0.23 is still actively maintained or was a historical feature. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pandas extension decorators, custom pandas methods, pandas accessor registration, extend pandas dataframe, pandas monkeypatch alternative, pandas plugin system, dataframe custom methods, pandas-extension, decorator-pattern [View on SkillFed](https://skillfed.io/packages/pandas-flavor) · [View on PyPI](https://pypi.org/project/pandas-flavor/)