Agent skill
csv-analyzer
Analisar datasets CSV
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/csv-analyzer
SKILL.md
Análise de datasets CSV de benefícios sociais usando pandas.
Carregar CSV
import pandas as pd
# CSV padrão
df = pd.read_csv("arquivo.csv")
# CSV com encoding brasileiro
df = pd.read_csv("arquivo.csv", encoding="latin-1", sep=";")
# CSV grande (em chunks)
for chunk in pd.read_csv("arquivo.csv", chunksize=10000):
processar(chunk)
Análises Comuns
Visão Geral
# Primeiras linhas
df.head()
# Informações
df.info()
# Estatísticas
df.describe()
# Valores únicos por coluna
df.nunique()
Contagens
# Por programa
df["programa"].value_counts()
# Por UF
df["uf"].value_counts()
# Por faixa de valor
pd.cut(df["valor"], bins=[0, 100, 300, 600, 1000]).value_counts()
Agregações
# Valor total por UF
df.groupby("uf")["valor"].sum()
# Média por programa
df.groupby("programa")["valor"].mean()
# Contagem por município
df.groupby(["uf", "municipio"]).size()
Datasets do Tá na Mão
Bolsa Família
df = pd.read_csv("backend/data/bolsa_familia.csv")
# Colunas esperadas: cpf, nis, valor, municipio_id, data_referencia
BPC/LOAS
df = pd.read_csv("backend/data/bpc.csv")
# Colunas: cpf, tipo (idoso/deficiente), valor, municipio_id
TSEE (Tarifa Social)
df = pd.read_csv("backend/data/tsee.csv")
# Colunas: cpf, distribuidora, desconto, municipio_id
Farmácia Popular
df = pd.read_csv("backend/data/farmacias.csv")
# Colunas: nome, endereco, lat, lng, municipio_id
Limpeza de Dados
# Remover duplicatas
df = df.drop_duplicates()
# Preencher nulos
df["valor"] = df["valor"].fillna(0)
# Converter tipos
df["cpf"] = df["cpf"].astype(str).str.zfill(11)
df["valor"] = pd.to_numeric(df["valor"], errors="coerce")
# Remover espaços
df["nome"] = df["nome"].str.strip()
Exportar Resultados
# CSV
df.to_csv("resultado.csv", index=False)
# JSON
df.to_json("resultado.json", orient="records", force_ascii=False)
# Resumo em markdown
resumo = df.groupby("uf")["valor"].sum().to_markdown()
Visualização Rápida
import matplotlib.pyplot as plt
# Barras por UF
df.groupby("uf")["valor"].sum().plot(kind="bar")
plt.title("Valor Total por UF")
plt.savefig("grafico.png")
Dicas de Performance
- Datasets > 1GB: usar
chunksize - Muitas colunas: selecionar apenas necessárias com
usecols - Tipos conhecidos: especificar
dtypepara economizar memória
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?