data-science
Installation
SKILL.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.