Static linter to optimize Pandas/Numpy code
Project description
pandas_lint
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 ofiterrows(), and inefficient string manipulations. - Best Practices: Enforces standard Pandas coding styles and conventions.
- Safety: Warns about potential issues like
SettingWithCopyWarningrisks 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pandas_linter-0.1.0.tar.gz.
File metadata
- Download URL: pandas_linter-0.1.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72db2f29fdd539649342fc8f615f6b8b9159c4f82032fbe49c4d9153494ec708
|
|
| MD5 |
584a7359e1694331324cea841266cf4e
|
|
| BLAKE2b-256 |
ba186e2eab14dc5dd1b298d0b06e90e234e4b2910412a66928eb82e397ccf7a8
|
File details
Details for the file pandas_linter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pandas_linter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45977ca2783c17eea8d6c0618749a55cba68f8640799360a4e15935e40c5eb76
|
|
| MD5 |
a038030df1d58da4aa94bcb0f5011a70
|
|
| BLAKE2b-256 |
693635807cdef16ad55c9564e1732f898a974c04e86df776d5c58c095093b68d
|