AGENT SKILL
csv-analysis
暂无简介
使用场景电子表格
- License 许可
- MIT
- 最近更新
- 2026-08-31
- Stars
- ★ 0
- Forks
- 0
03 SKILL.md 正文
CSV Analysis
How to analyse CSV data deterministically using tools.
Approach
-
Examine structure first — use
read_fileto read the first 5-10 lines. Identify columns, data types, and delimiters. -
Write code, don't guess — always use
execute_codewith pandas for numerical answers. Never estimate or count manually. -
Validate results — check row counts, null values, and data types before drawing conclusions.
Template
import pandas as pd
df = pd.read_csv('path/to/file.csv')
print(f"Shape: {df.shape}")
print(f"Columns: {list(df.columns)}")
print(df.describe())
Common pitfalls
- CSV files may have different encodings — try
encoding='utf-8'first, then'latin-1' - Large files: use
nrows=1000for initial exploration - Mixed types in columns: pandas may infer wrong dtype, check with
df.dtypes