python-data

Performs heavy numerical compute and statistical analysis inside the sandbox.

npx skills add https://github.com/google-gemini/gemini-managed-agents-templates --skill python-data

Python data skill

Run complex calculations, regressions, and aggregations using pandas and scikit-learn in the sandbox.

Workflow

  1. Write a Python script using pandas, numpy, or sklearn to:
    • Join, filter, and aggregate tables.
    • Compute statistics (mean, median, stddev, correlations).
    • Build or evaluate ML models.
    • Run statistical tests (chi-square, t-test) when appropriate.
  2. Execute in the sandbox. Run via python3 script.py.
  3. Handle errors. If the code fails, read the traceback and fix it.
  4. Return structured output. Print results as JSON for downstream skills.

Example output

[
  {"segment": "High Risk", "churn_rate": 0.34, "avg_tenure": 2.1},
  {"segment": "Low Risk",  "churn_rate": 0.05, "avg_tenure": 14.7}
]

Notes

  • Use select_dtypes(include=["object", "str"]) for categorical columns (avoids the pandas 4 deprecation warning).
  • Install missing packages with pip install -q <package> before importing.

More skills from google-gemini

greeter
google-gemini
A friendly greeter skill
official
code-reviewer
google-gemini
Automated code review for local changes and remote pull requests with structured analysis across correctness, maintainability, and security. Supports both local file system changes (staged and unstaged) and remote PRs (by number or URL) with automatic GitHub CLI checkout Analyzes code across seven dimensions: correctness, maintainability, readability, efficiency, security, edge case handling, and test coverage Runs optional preflight verification suites (e.g., npm run preflight ) to catch...
official
review-duplication
google-gemini
Use this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing…
official
reconciliation
google-gemini
Reconcile loaded expenses against the pre-parsed invoice database, flagging discrepancies like amount mismatches, missing invoices, and merchant mismatches…
official
gemini-api-cli
google-gemini
Guide for using the Gemini API CLI tool. Use when you need to interact with the Gemini API via the command line, manage agents, or generate media (images,…
official
agent-tui
google-gemini
Main Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications…
official
async-pr-review
google-gemini
Trigger this skill when the user wants to start an asynchronous PR review, run background checks on a PR, or check the status of a previously started async PR…
official
behavioral-evals
google-gemini
Guidance for creating, running, fixing, and promoting behavioral evaluations. Use when verifying agent decision logic, debugging failures, debugging prompt…
official