Finds slow pandas code, checks rewrites give identical results on your data, measures speedups.
MCPpedia last refreshed this data
io.github.furqan-khan07/pandas-doctor is an MCP server that finds slow pandas code, checks rewrites give identical results on your data, measures speedups. Its tool list has not been published yet over stdio, sse and http, requires no API key, and scores 87/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"pandas-doctor": {
"args": [
"--from",
"pandas-doctor[mcp]",
"pandas-doctor",
"mcp"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Finds slow pandas code, checks rewrites give identical results on your data, measures speedups.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
uvx 'pandas-doctor' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked pandas-doctor against OSV.dev.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in other
Unofficial KakaoTalk CLI and native MCP server for macOS — read, watch, and send messages via Accessibility automation.
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
MCP WordPress Remote proxy server
Generate, validate, repair and style editable draw.io XML diagrams.
MCP Security Weekly
Get CVE alerts and security updates for io.github.furqan-khan07/pandas-doctor and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
pandas-doctor finds the slow pandas lines in your code, rewrites them, and checks on your own data that the result is exactly the same. Then it tells you how much faster the rewrite was, measured, not guessed.

That's a real run on real data: examples/taxi/features.py on January 2024 of the NYC TLC yellow taxi trips (2.96 million rows), with the kind of loops a lot of notebooks have. The script took 96.6 s (M4 Pro, pandas 3.1.0 with pyarrow). pandas-doctor checked 5 rewrites on the script's own data, all identical and faster. After --fix the whole script runs in 1.64 s and prints exactly the same output. Full report in docs/taxi-run-full.txt.
No download needed for examples/hero/features.py, the same script on 1M seeded synthetic trips: 27.9 s before, 1.01 s after (report).
pip install pandas-doctor
pandas-doctor run your_script.py
Or try it in your browser first, nothing to install:
run executes your script normally. Wherever it spots a slow pattern, it copies that code's inputs, lets your code run as usual, then runs the rewrite on the copies and compares the outputs. --diff shows the verified rewrites as a patch, and --fix writes them into the file.
In a notebook:
%load_ext pandas_doctor
%%doctor
for i, row in df.iterrows():
df.at[i, "total"] = row["price"] * row["qty"]
%%doctor --rewrite drops the verified version into a new cell below.
Two results count as identical only when they have:
numpy.float64 is not float)Every check ends in one of four verdicts:
| Verdict | What it means | Does run apply it? |
|---|---|---|
| identical | everything above matches | yes |
| equal values, different scalar types | every value is exactly equal, but some are numpy scalars where the original had Python ones, or the other way round. The report names the types. | yes, and the report says so. --strict-types turns this off. |
| equal within tolerance | floats differ by at most --rtol, usually from summing in a different order. The largest difference is shown. | only with --rtol |
| different | anything else, with the first place it differs | no |
That's stricter than it sounds, and it catches real differences:
iterrows hands you each row as a Series, so an int column turns into floats when the frame also has float columns. The obvious rewrite keeps the ints, and the dtype changes: different.row["x"] * 2 into a list gives numpy floats; the same thing via .tolist() gives Python floats: equal values, different scalar types. That rarely matters, but it can: json.dumps can't handle a numpy.int64.When the plain rewrite isn't accepted, pandas-doctor tries a few more faithful versions: the row dtype iterrows used, numpy scalars, the same summation order. It keeps the plainest one that's accepted, and between equally plain ones it prefers identical. If none is ac