ludo-technologies/python-best-practices/data-science
Claude Code and agent skill by ludo-technologies/python-best-practices
- community
Checking that the SKILL.md file is still in the repository.
NumPy and pandas best practices for data science and ML code covering vectorization, DataFrame indexing and mutation under Copy-on-Write, dtypes, schema validation with pandera, reproducible randomness, transformation style, array typing, and numeric testing. Use when writing, reviewing, or refactoring code that uses numpy, pandas, DataFrames, ndarrays, Jupyter notebooks, or data pipelines, or when the user asks about pandas/numpy performance or idioms.
Install
npx vskill@latest install ludo-technologies/python-best-practices/data-scienceSKILL.md
Python Data Science
NumPy and pandas best practices for data science and ML code. Designed for AI agents and LLMs to write fast, correct, and reproducible numeric code.
Numeric code has idioms that differ from general Python: loops are the anti-pattern, data structures are immutable buffers, and dtypes are a design decision. Where a rule here overlaps a coding-standards rule, this skill takes precedence for array and DataFrame code.
Categories
Vectorization [CRITICAL]
Keep computation in compiled NumPy/pandas code instead of the Python interpreter.
| Rule | Description | |
|---|---|---|
| vec-no-python-loops | Vectorize instead of Python loops, iterrows, and row-wise apply (10-1000x faster) | |
| vec-no-incremental-growth | Build arrays and DataFrames once, not incrementally (O(n) vs O(n²)) |
Indexing & Mutation [CRITICAL]
Write to DataFrames in ways that are correct under Copy-on-Write and visible in the data flow.
| Rule | Description | |
|---|---|---|
| mut-loc-not-chained | Assign with .loc, never with chained indexing | |
| mut-no-inplace | Avoid inplace=True |
Data Types [HIGH]
Make dtypes an explicit decision rather than an inference result.
| Rule | Description | |
|---|---|---|
| dtype-explicit-io | Specify dtypes when loading data | |
| dtype-categorical | Use category dtype for low-cardinality strings | |
| dtype-numpy-explicit | Choose NumPy dtypes explicitly |
Schema Validation [HIGH]
Validate tabular data where it enters the system.
| Rule | Description | |
|---|---|---|
| schema-pandera | Validate DataFrames at boundaries with pandera |
Reproducibility [HIGH]
Make experiments repeatable and free of hidden global state.
| Rule | Description | |
|---|---|---|
| repro-default-rng | Use an explicit Generator for randomness |
Transformation Style [MEDIUM]
Write DataFrame transformations that read top-to-bottom as a single pipeline.
| Rule | Description | |
|---|---|---|
| style-method-chaining | Express transformations as method chains | |
| style-named-aggregation | Use named aggregation in groupby |
Typing [MEDIUM]
Type hints that carry dtype and column information.
| Rule | Description | |
|---|---|---|
| type-array-annotations | Annotate arrays and frames with precise types |
Testing [MEDIUM]
Assertions that fit floating-point arrays and DataFrames.
| Rule | Description | |
|---|---|---|
| test-numeric-assertions | Compare numeric results with tolerance-aware assertions |
Quick Reference
Vectorization
Indexing & Mutation
Data Types
Schema Validation
Reproducibility
Transformation Style
Typing
Testing
See Also
- coding-standards - General Python rules;
validation-pydantic,design-no-global-singleton, anddoc-type-hintshave direct counterparts here - testing - pytest structure, fixtures, and mocking that numeric tests still follow
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/data-science/SKILL.md
Popularity
- Repository stars
- 24
- Repository forks
- 5
- 7-day trend score
- 16
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ludo-technologies/python-best-practices/data-science)