python-programming_skill

This skill helps you write efficient Python data science code with Pandas, NumPy, and data manipulation best practices.
  • Python

5

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill pluginagentmarketplace/custom-plugin-ai-data-scientist --skill python-programming

  • SKILL.md3.7 KB

Overview

This skill provides practical Python programming guidance focused on fundamentals, data structures, and data science libraries like Pandas and NumPy. It helps you write efficient, maintainable Python code for data manipulation, analysis, and basic algorithm implementation. Use it to speed up workflows and avoid common performance and data-handling pitfalls.

How this skill works

The skill inspects common Python usage patterns and suggests idiomatic alternatives, emphasizing vectorized operations, correct data types, and library best practices. It guides file I/O with Pandas, missing-data handling, merging strategies, and performance tuning steps like chunking and dtype optimization. It also provides debugging checklists and concrete code snippets to apply immediately.

When to use it

  • Writing or refactoring Python scripts for data cleaning and transformation
  • Loading, merging, or exporting datasets with Pandas/NumPy
  • Optimizing slow DataFrame operations and reducing memory usage
  • Implementing algorithms that should leverage vectorization over loops
  • Preparing data for machine learning or exploratory data analysis

Best practices

  • Prefer vectorized NumPy/Pandas operations instead of Python loops
  • Optimize DataFrame dtypes (e.g., int32, category) to save memory
  • Profile before optimizing using %timeit and df.info() to target hotspots
  • Handle missing values explicitly with fillna, dropna, or imputation strategies
  • Use chunked reads for very large files and convert heavy string columns to category

Example use cases

  • Read a large CSV in chunks, process each chunk, and write aggregated results
  • Convert messy date and numeric columns to proper dtypes before analysis
  • Merge multiple tables on keys with pd.merge and handle missing joins with how='left'
  • Replace slow apply-based transformations with vectorized np.where or arithmetic on columns
  • Diagnose memory issues by inspecting df.info() and converting repeated strings to category

FAQ

Start by replacing row-wise loops and df.apply with vectorized NumPy/Pandas operations, convert heavy columns to efficient dtypes, and profile with %timeit to confirm improvements.

What is the best way to handle very large CSV files?

Read in chunks using pd.read_csv(..., chunksize=...), process or aggregate each chunk, and avoid holding the full dataset in memory; also optimize dtypes during or after reading.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
python-programming skill by pluginagentmarketplace/custom-plugin-ai-data-scientist | VeilStrat