Skip to content

is a static code analysis tool designed to help you write more efficient and readable Pandas and NumPy code. It detects common anti-patterns and performance bottlenecks, offering suggestions to improve your data processing pipelines.

License

Notifications You must be signed in to change notification settings

Jean-EstevezT/pandas_lint

Repository files navigation

pandas_lint

PyPI - Version PyPI - Python Version License

pandas_lint is a static code analysis tool designed to help you write more efficient and readable Pandas and NumPy code. It detects common anti-patterns and performance bottlenecks, offering suggestions to improve your data processing pipelines.

Features

  • Performance Optimization: Identifies slow operations like apply(), usage of iterrows(), and inefficient string manipulations.
  • Best Practices: Enforces standard Pandas coding styles and conventions.
  • Safety: Warns about potential issues like SettingWithCopyWarning risks and modification of views.
  • Easy Integration: Zero-config needed to get started, but fully configurable via pyproject.toml.

Installation

You can install pandas_lint directly from PyPI:

pip install pandas-linter

Usage

Command Line Interface

To lint a file or directory:

pandas-lint path/to/your/script.py
pandas-lint path/to/your/project/

To automatically fix issues where possible (experimental):

pandas-lint path/to/script.py --autofix

Configuration

You can configure pandas_lint in your pyproject.toml file:

[tool.pandas-linter]
ignore = ["STY001", "PERF002"]

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on how to get started.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

is a static code analysis tool designed to help you write more efficient and readable Pandas and NumPy code. It detects common anti-patterns and performance bottlenecks, offering suggestions to improve your data processing pipelines.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published