sweetviz-3-dataset-comparison-compare
Sub-skill of sweetviz: 3. Dataset Comparison (Compare).
Best use case
sweetviz-3-dataset-comparison-compare is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of sweetviz: 3. Dataset Comparison (Compare).
Teams using sweetviz-3-dataset-comparison-compare should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/3-dataset-comparison-compare/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How sweetviz-3-dataset-comparison-compare Compares
| Feature / Agent | sweetviz-3-dataset-comparison-compare | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of sweetviz: 3. Dataset Comparison (Compare).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 3. Dataset Comparison (Compare)
## 3. Dataset Comparison (Compare)
**Train vs Test Comparison:**
```python
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:**
```python
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, "After Cleaning"]
)
comparison.show_html("cleaning_comparison.html")
```
**Production vs Development Data:**
```python
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")
```Related Skills
export-tax-summary-with-year-comparison
Extract and structure tax return data into YAML format for year-over-year comparison across different filing products
orcaflex-results-comparison
Compare results across multiple OrcaFlex simulations for design verification, sensitivity studies, and configuration comparison. Includes pretension, stiffness, and force distribution analysis.
orcaflex-results-comparison-comparison-summary-table
Sub-skill of orcaflex-results-comparison: Comparison Summary Table (+1).
orcaflex-results-comparison-comparison-bar-chart
Sub-skill of orcaflex-results-comparison: Comparison Bar Chart (+1).
orcaflex-results-comparison-basic-comparison
Sub-skill of orcaflex-results-comparison: Basic Comparison (+1).
orcaflex-results-comparison-1-pretension-comparison
Sub-skill of orcaflex-results-comparison: 1. Pretension Comparison (+3).
webapp-testing-example-1-screenshot-comparison-testing
Sub-skill of webapp-testing: Example 1: Screenshot Comparison Testing (+2).
highcharts-boost-module-large-datasets
Sub-skill of highcharts: Boost Module (Large Datasets) (+2).
chartjs-example-1-multi-dataset-line-chart
Sub-skill of chartjs: Example 1: Multi-Dataset Line Chart (+5).
openpyxl-5-large-dataset-handling-with-streaming
Sub-skill of openpyxl: 5. Large Dataset Handling with Streaming.
ydata-profiling-6-comparison-reports
Sub-skill of ydata-profiling: 6. Comparison Reports.
ydata-profiling-5-large-dataset-handling
Sub-skill of ydata-profiling: 5. Large Dataset Handling.