Find slow pandas code
check_codeScans Python source without running it to find slow pandas patterns such as iterrows loops, row-wise apply, and concat in loops, flagging code worth rewriting.
Instructions
Scan Python source for slow pandas patterns (iterrows loops, row-wise apply, concat in a loop, cell-by-cell writes, groupby-apply aggregates) without running it.
Use this first, to find what is worth rewriting. Each finding has a rule code (see list_rules), a line, a severity, a message and often a suggested rewrite. Suggestions are not verified: before telling the user a rewrite is equivalent or faster, call verify_rewrite on representative inputs. Read-only: the code is parsed, never executed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "check_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python source to scan: a script, module or notebook cell. | |
| filename | No | Name shown in findings; use the real path if there is one. | snippet.py |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||