원클릭으로
clean
Clean and transform data files — fix types, handle missing values, remove duplicates
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Clean and transform data files — fix types, handle missing values, remove duplicates
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Full agentic analysis pipeline — ingest, clean, analyze, visualize, report, and dashboard from any data
Build a standalone interactive HTML dashboard with Chart.js from any dataset
Profile data files — row counts, column types, missing values, duplicates, statistics
Ask natural language questions about your data and get answers with evidence
Generate a comprehensive Markdown analysis report with findings, charts, and recommendations
Generate charts and plots from data — line, bar, pie, heatmap, scatter, histogram
| name | clean |
| description | Clean and transform data files — fix types, handle missing values, remove duplicates |
| argument-hint | [dataset-name] |
| risk | safe |
| disable-model-invocation | false |
| user-invocable | true |
| allowed-tools | Read, Write, Bash, Glob, Grep |
| model | claude-haiku-4-5-20251001 |
| context | fork |
| agent | general-purpose |
Clean and transform raw data files into analysis-ready datasets.
Automated data cleaning pipeline: parse dates, convert currencies, standardize column names, handle missing values, remove duplicates. Reads from input/<dataset>/, outputs cleaned files to output/<dataset>/cleaned-data/.
:analyze manually on pre-cleaned dataParse $ARGUMENTS to get the dataset name.
input/<dataset-name>/output/<dataset-name>/cleaned-data/$ARGUMENTS and set pathsinput/<dataset>/ using Globmkdir -p output/<dataset>/cleaned-dataimport pandas as pd
import re
import os
def clean_file(filepath, output_dir):
ext = os.path.splitext(filepath)[1].lower()
basename = os.path.basename(filepath)
if ext == '.csv':
df = pd.read_csv(filepath)
elif ext in ['.xlsx', '.xls']:
df = pd.read_excel(filepath)
elif ext == '.json':
df = pd.read_json(filepath)
else:
return
original_rows = len(df)
# 1. Standardize column names
df.columns = df.columns.str.strip().str.lower().str.replace(r'[^a-z0-9]+', '_', regex=True).str.strip('_')
# 2. Drop exact duplicates
df.drop_duplicates(inplace=True)
# 3. Parse date columns (columns with 'date', 'time', 'created', 'updated' in name)
date_cols = [c for c in df.columns if any(kw in c for kw in ['date', 'time', 'created', 'updated'])]
for col in date_cols:
df[col] = pd.to_datetime(df[col], errors='coerce')
# 4. Convert currency strings to float
for col in df.select_dtypes(include='object').columns:
sample = df[col].dropna().head(20).astype(str)
if sample.str.match(r'^\$?[\d,]+\.?\d*$').mean() > 0.5:
df[col] = df[col].astype(str).str.replace(r'[$,]', '', regex=True)
df[col] = pd.to_numeric(df[col], errors='coerce')
# 5. Handle missing values
for col in df.columns:
missing_pct = df[col].isna().mean()
if missing_pct > 0.5:
df.drop(columns=[col], inplace=True)
elif missing_pct > 0:
if df[col].dtype in ['float64', 'int64']:
df[col].fillna(df[col].median(), inplace=True)
else:
df[col].fillna('Unknown', inplace=True)
# 6. Save cleaned file
output_path = os.path.join(output_dir, basename)
if ext == '.json':
df.to_json(output_path, orient='records', indent=2)
else:
df.to_csv(output_path, index=False)
cleaned_rows = len(df)
print(f"{basename}: {original_rows} -> {cleaned_rows} rows ({original_rows - cleaned_rows} removed)")
output/<dataset>/cleaning-log.md| File | Original Rows | Cleaned Rows | Removed | Actions Taken |
|------|--------------|-------------|---------|---------------|
/10x-analyst:clean shopify-data
Developed by 10x.in | 10x-Analyst v1.0.0