技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
sweetviz【数据与研究】Use Sweetviz to generate pandas EDA reports, compare tabular datasets, configure feature typing, and troubleshoot HTML/notebook output.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task involves Sweetviz, pandas exploratory data analysis reports, target-aware tabular profiling, train/test dataset comparison, feature type overrides, Sweetviz config files, or Sweetviz HTML/notebook output troubleshooting.
Install Sweetviz in the active project environment:
python -m pip install sweetviz
For source checkouts or local fixes, use an editable install from that checkout:
python -m pip install -e .
Verify the public import and signatures before writing guidance that depends on exact parameters:
import sweetviz as sv
print(sv.__version__)
print(sv.analyze)
Or run the bundled environment checker:
python scripts/check_sweetviz_install.py --json
Route to a sub-skill for the actual workflow.
sub-skills/report-generation/ when the user wants to create a Sweetviz report from one pandas DataFrame, choose a target, save HTML with show_html(), embed with show_notebook(), control layout/scale, avoid browser launches, or understand optional Comet logging.sub-skills/dataset-comparison/ when the user wants to compare train/test DataFrames, baseline/current datasets, or two groups from one DataFrame with compare() or compare_intra().sub-skills/configuration-and-data-handling/ when the user mentions FeatureConfig, skipped/forced feature types, wrong type inference, config overrides, quiet/progress-only output, duplicate columns, target NaNs, mixed types, CJK fonts, or preflight validation.Common tasks often need two routes: validate/force feature types with configuration-and-data-handling, then render with report-generation or compare with dataset-comparison.
Sweetviz 2.3.3 exposes these primary objects from import sweetviz as sv:
sv.analyze(source, target_feat=None, feat_cfg=None, pairwise_analysis='auto')sv.compare(source, compare, target_feat=None, feat_cfg=None, pairwise_analysis='auto')sv.compare_intra(source_df, condition_series, names, target_feat=None, feat_cfg=None, pairwise_analysis='auto')sv.FeatureConfig(skip=None, force_cat=None, force_text=None, force_num=None)sv.DataframeReport with show_html(), show_notebook(), and log_comet() methodssv.config_parser for INI-style defaults such as verbosity, layouts, CJK fonts, and type thresholdsDo not pass verbosity= to public sv.analyze() or sv.compare() in this version. Use [General] default_verbosity through sv.config_parser or the lower-level DataframeReport(..., verbosity=...) path when that trade-off is intentional.
FeatureConfig(force_num=[...]) when needed.pairwise_analysis='auto' can warn and return early for wide data; use 'off' for deterministic smoke reports or 'on' only when the user explicitly wants associations and accepts the cost.