xpd
xpd is a fast, opinionated linter for Python library habits that make code slow or wrong, starting with pandas and scikit-learn. Each library gets one set of rules, written for its current version. It fixes what it can, and it is built to run after every edit a coding agent makes.
$ xpd check samples/bad.py
samples/bad.py:5:15: warning [pandas/row-loop] A loop over rows runs Python once per row. Compute on whole columns instead, such as df["a"] * df["w"].
samples/bad.py:6:5: error [pandas/chained-assignment] Chained assignment writes to a copy under copy-on-write, so the frame keeps its old values. Assign to df.loc[i, "a"] instead.
samples/bad.py:7:1: warning [pandas/no-inplace] inplace=True gives no speedup and blocks chaining. Reassign instead.
samples/bad.py:8:5: warning [pandas/merge-without-validate] merge without validate= can silently duplicate rows.
samples/bad.py:11:11: warning [pandas/concat-in-loop] Concatenating inside a loop is quadratic. Collect frames in a list, concat once.
xpd: 5 issues, 2 more with --fix --unsafe-fixes
Install
uv tool install xpd # or: uvx xpd check .
Before version 0.7.0 the package was pdx-lint and the command was pdx.
Use
| Command | What it does |
|---|---|
xpd check [paths] |
Lint files and folders. Exit 1 on any error, 2 if xpd can't run. |
xpd check --fix |
Apply safe fixes, then lint. Add --unsafe-fixes to apply the rest. |
xpd profile data.csv |
Show dtypes, nulls, unique counts and memory per column. Needs pandas. |
xpd equiv old.py new.py |
Check that two scripts leave an equal result. Needs pandas. |
xpd graph features.py |
Print the dataflow of step code or Apache Hamilton modules: what reads what, and what does not connect. |
xpd hook |
Lint the file a Claude Code edit touched. |
xpd skill |
Print the agent skill for this version. |
Run xpd -h for every flag.
Documentation
The full guide, including the Claude Code hook setup and how to write a rule, lives at https://snestra.github.io/xpd/.
License
MIT or Apache-2.0, at your choice.
Metadata
Release files for xpd 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xpd-0.7.0.tar.gz | 87.2 kB | Without provenance | Details for xpd-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xpd-0.7.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for xpd-0.7.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
Total release size: 2.5 MB
Release files / xpd-0.7.0.tar.gz
| Download URL | xpd-0.7.0.tar.gz |
|---|---|
| Size | 87.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e71e486de9a2f7d252bd644a8b4337b3247e625e916330dc2cbea6dcf223e8f
|
|
BLAKE2b-256 checksum How to use checksums |
13448a33608911fa7f59549720b4bb17640ddb3fdcfc2bb1c5e517616980f1e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / xpd-0.7.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | xpd-0.7.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
cb774f6ca48aebbc250d7f7f6de9fe974ce971d165341d20845aead74cade96f
|
|
BLAKE2b-256 checksum How to use checksums |
3ca21a5cb9a3b6122e6a159f3d62243369c43a98d58d1ca40c53e0cfaa662700
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for xpd 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.