用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill sweetviz-3-dataset-comparison-compare命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Write outbound email and external messages in Vamsee Achanta's voice — a subtle offer to help, never bold or rash claims. Load before drafting ANY email, LinkedIn/Collide reply, proposal note, or outreach sent under his name.
Save/publish analysis or computation results from ANY ecosystem repo to Hugging Face as a queryable, viewer-renderable dataset. Use when the user wants to "save results to hugging face", "publish dataset to HF", "hugging face data saving", "save analysis results", "hf dataset", "make results queryable", or "render via datasets-server API". Reshapes nested results into flat parquet tables, writes a dataset card with a viewer `configs:` block and provenance, applies license/public-vs-private routing, enforces a domain data-quality gate (faithful-to-source != correct), publishes to `aceengineer/<repo>-<projection>`, and verifies via the datasets-server API.
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
正在显示 SKILL.md
基于 SOC 职业分类
| name | sweetviz-3-dataset-comparison-compare |
| description | Sub-skill of sweetviz: 3. Dataset Comparison (Compare). |
| version | 1.0.0 |
| category | data-analysis |
| type | reference |
| scripts_exempt | true |
Train vs Test Comparison:
import sweetviz as sv
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
# Create sample dataset
np.random.seed(42)
n = 5000
df = pd.DataFrame({
"feature_1": np.random.randn(n),
"feature_2": np.random.exponential(50, n),
"feature_3": np.random.choice(["X", "Y", "Z"], n),
"feature_4": np.random.randint(1, 100, n),
"target": np.random.choice([0, 1], n, p=[0.75, 0.25])
})
# Split into train and test
train_df, test_df = train_test_split(df, test_size=0.2, random_state=42)
print(f"Train shape: {train_df.shape}")
print(f"Test shape: {test_df.shape}")
# Compare train vs test datasets
comparison_report = sv.compare(
source=[train_df, "Training Data"],
compare=[test_df, "Test Data"],
target_feat="target"
)
comparison_report.show_html("train_test_comparison.html")
Before vs After Comparison:
import sweetviz as sv
import pandas as pd
import numpy as np
np.random.seed(42)
# Original data with issues
df_before = pd.DataFrame({
"value": np.concatenate([
np.random.randn(900),
np.array([50, -30, 100, 75, -50]) # Outliers
]),
"category": np.random.choice(["A", "B", "C"], 905),
"score": np.random.uniform(0, 100, 905)
})
# Add missing values
df_before.loc[np.random.choice(905, 80), "value"] = np.nan
# Cleaned data
df_after = df_before.copy()
# Remove outliers using IQR
Q1 = df_after["value"].quantile(0.25)
Q3 = df_after["value"].quantile(0.75)
IQR = Q3 - Q1
df_after = df_after[
(df_after["value"].isna()) | # Keep NaN for now
((df_after["value"] >= Q1 - 1.5 * IQR) &
(df_after["value"] <= Q3 + 1.5 * IQR))
]
# Fill missing values
df_after["value"] = df_after["value"].fillna(df_after["value"].median())
# Compare before vs after cleaning
comparison = sv.compare(
source=[df_before, "Before Cleaning"],
compare=[df_after, ]
)
comparison.show_html()
Production vs Development Data:
import sweetviz as sv
import pandas as pd
import numpy as np
np.random.seed(42)
# Development data (historical)
df_dev = pd.DataFrame({
"feature_1": np.random.randn(3000),
"feature_2": np.random.exponential(100, 3000),
"category": np.random.choice(["A", "B", "C"], 3000, p=[0.5, 0.3, 0.2])
})
# Production data (slightly different distribution - data drift)
df_prod = pd.DataFrame({
"feature_1": np.random.randn(1000) * 1.2 + 0.3, # Shifted and scaled
"feature_2": np.random.exponential(120, 1000), # Different mean
"category": np.random.choice(["A", "B", "C", "D"], 1000, p=[0.4, 0.3, 0.2, 0.1]) # New category
})
# Detect data drift
drift_report = sv.compare(
source=[df_dev, "Development"],
compare=[df_prod, "Production"]
)
drift_report.show_html("data_drift_analysis.html")