dataset-comparison
Compare two pandas DataFrames or two subsets of one DataFrame with Sweetviz, including target-aware validation and deterministic HTML output checks.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- dataset-comparison
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Compare two pandas DataFrames or two subsets of one DataFrame with Sweetviz, including target-aware validation and deterministic HTML output checks.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md6.2 KB
- 参考文档references/troubleshooting.md6.9 KB
- 参考文档references/workflows.md7.2 KB
- 脚本scripts/sweetviz_compare_smoke.py8.6 KB
03 SKILL.md 正文
Dataset Comparison
Use this sub-skill when the task asks for Sweetviz comparison, train/test profiling, dataset drift/profile comparison, or subgroup comparison such as "male vs female". It owns sweetviz.compare() and sweetviz.compare_intra() guidance only.
Route here when
- Comparing two existing pandas DataFrames, usually train/test, baseline/current, or reference/candidate.
- Splitting one DataFrame into two named groups with a boolean condition and comparing the groups.
- The comparison includes a target feature and needs validation before rendering.
- The user mentions
compare,compare_intra, subgroup split, non-boolean condition, empty split, or compare-only columns.
Route elsewhere
- Single-DataFrame
sweetviz.analyze()or render-only/browser/notebook details: use thereport-generationsub-skill. - Detailed
FeatureConfig, type forcing, config override files, duplicate-column cleanup, or input preflight beyond comparison-specific checks: use theconfiguration-and-data-handlingsub-skill. - Install/import/package-data/font issues: use the Sweetviz root troubleshooting reference.
Operating flow
- Choose the constructor:
sweetviz.compare([source_df, "Source name"], [compare_df, "Compare name"], target_feat=..., feat_cfg=..., pairwise_analysis=...)for two DataFrames.sweetviz.compare_intra(source_df, condition_series, ["True group", "False group"], target_feat=..., feat_cfg=..., pairwise_analysis=...)for a split of one DataFrame.
- Validate comparison inputs before constructing the report:
- No duplicate columns in either DataFrame.
compare_intracondition has the same length assource_df, has plain boolean dtype, and creates non-empty true and false groups.- Target feature exists in the source, is not skipped, is numeric or boolean, and has no missing values. If the compare DataFrame also contains the target, it must also have no missing values.
- Any names used in
FeatureConfigare case-sensitive and must be present in the source DataFrame.
- Prefer explicit dataset names (
[df, "Training Data"]or(df, "Training Data")) so report sections are interpretable. - Pick
pairwise_analysis: use"off"for deterministic or wide smoke runs,"auto"for ordinary small reports, and"on"only when association cost is acceptable. - Render with
report.show_html(..., open_browser=False)for automated work and validate the output file exists and is non-empty. For layout/browser/notebook choices, defer toreport-generation.
Bundled references and helper
- Comparison workflows: train/test and
compare_intrarecipes with tiny schemas and deterministic output validation. - API reference: verified signatures, accepted input shapes, naming, target/config interactions, pairwise behavior, and column mismatch notes.
- Troubleshooting: non-boolean conditions, empty splits, duplicate columns, target NaNs, missing
FeatureConfignames, and pairwise threshold behavior. - Smoke script: offline argparse helper that builds tiny fixtures, runs
compareand/orcompare_intra, writes HTML without opening a browser, and can demonstrate invalid non-boolean conditions.
Non-goals and cautions
- Do not pass
verbositytosweetviz.compare()orsweetviz.compare_intra(); their public signatures do not accept it. If progress output must be controlled, use Sweetviz configuration defaults or the lower-level report class guidance from the configuration/reporting sub-skills. - Do not use maintainer or network-update helpers for end-user EDA comparison workflows.
- Optional Comet.ml logging is credentialed external behavior owned by reporting guidance; do not require it for comparison verification.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).