Data Quality Fixes
Use this sub-skill when the user asks about FixDQ, data_cleaning_suggestions, duplicate rows, mixed data types, infinities, rare categories, leakage, skew, outliers, or data-cleaning advice that appears during an AutoViz run.
Use this when
- The prompt names
FixDQ, Fix_DQ, data_cleaning_suggestions, or dq_report.
- AutoViz prints data-quality warnings before plotting.
- The user wants a transformer-like cleanup step they can reuse on train/test data.
- The user is debugging
pandas_dq, pandas compatibility, or missing IPython.display.
- The user wants to know whether a noisy dataset should be cleaned before plotting.
Core flow
- Start with a pandas DataFrame.
- Use
data_cleaning_suggestions(df, target=target) for a report-style inspection.
- Use
FixDQ() when the user wants a fit/transform style cleaning object.
- Keep target handling explicit: pass a target column name, a target list,
"", or None according to the user's problem.
- After cleaning, hand the resulting DataFrame back to the EDA sub-skill for visualization.
- When the user only wants diagnosis, stop at the report and explain the result in plain language.
Read these references
Use these scripts
- Run
scripts/fixdq_smoke.py to verify that FixDQ and data_cleaning_suggestions can be imported and exercised on a tiny DataFrame.
- If the failure is really plot rendering or
chart_format, switch to the EDA sub-skill and run its smoke script.
- If the failure looks like a package install issue, run
../../scripts/inspect_install.py first.
Important compatibility facts
data_cleaning_suggestions delegates to pandas_dq.dq_report.
- This repository version works with pandas 2.x; pandas 3.x removed
DataFrame.applymap, which can break pandas_dq.
pandas_dq imports IPython.display, so a non-notebook environment may still need IPython installed.
FixDQ.__init__ accepts quantile, cat_fill_value, num_fill_value, rare_threshold, and correlation_threshold.
- The report path is still useful even when the user never wants plots.
Issues the report can surface
- duplicate rows or duplicate columns
- zero-variance features
- rare categories
- high-cardinality features
- infinite values
- mixed Python types in a single column
- skewed distributions
- highly correlated features or leakage
- imbalanced classes
- target-related issues when a target column is supplied
Cross-routing
- If the user asks for saved charts or automated EDA plots after cleaning, route to
../eda-visualization/SKILL.md.
- If the data-quality issue is specific to long text columns or wordcloud behavior, route to
../text-wordclouds/SKILL.md.
- Keep dependency/environment fixes in references; do not leak private inspection-environment paths.
- If the user wants to apply the same cleanup to train and test data, emphasize
FixDQ over the report-only helper.
Troubleshooting reminders
- If the report fails at import time, check
IPython first, then pandas version, then XGBoost/setuptools interactions.
- If a tiny sample gives odd warnings, explain that the dataset may be too small to classify reliably.
- If the target column is missing or misspelled, verify the exact column name before retrying.
- If the result object is a
Styler or other display wrapper, describe that the report succeeded even if the object is not a plain DataFrame.
Escalation
If the user wants to continue from the report into plotting, route back to the EDA sub-skill with the cleaned DataFrame.
If the user wants text-column advice rather than numeric or categorical cleanup, route to the text sub-skill instead of stretching this one.
1---2name: data-quality-fixes3description: "Use AutoViz data-quality reports and FixDQ to inspect and repair4 tabular data issues."5metadata:6 source: https://skillmd.com/skills/vectorspacelab/data-quality-fixes7 disco-role: operating8disable-model-invocation: true9license: Apache 2.010---1112# Data Quality Fixes1314Use this sub-skill when the user asks about `FixDQ`, `data_cleaning_suggestions`, duplicate rows, mixed data types, infinities, rare categories, leakage, skew, outliers, or data-cleaning advice that appears during an AutoViz run.1516## Use this when1718- The prompt names `FixDQ`, `Fix_DQ`, `data_cleaning_suggestions`, or `dq_report`.19- AutoViz prints data-quality warnings before plotting.20- The user wants a transformer-like cleanup step they can reuse on train/test data.21- The user is debugging `pandas_dq`, pandas compatibility, or missing `IPython.display`.22- The user wants to know whether a noisy dataset should be cleaned before plotting.2324## Core flow25261. Start with a pandas DataFrame.272. Use `data_cleaning_suggestions(df, target=target)` for a report-style inspection.283. Use `FixDQ()` when the user wants a fit/transform style cleaning object.294. Keep target handling explicit: pass a target column name, a target list, `""`, or `None` according to the user's problem.305. After cleaning, hand the resulting DataFrame back to the EDA sub-skill for visualization.316. When the user only wants diagnosis, stop at the report and explain the result in plain language.3233## Read these references3435- [`references/workflows.md`](references/workflows.md): report and transformer recipes.36- [`references/troubleshooting.md`](references/troubleshooting.md): pandas, `IPython`, and `pandas_dq` compatibility notes.37- [`../../references/install-and-compatibility.md`](../../references/install-and-compatibility.md): package-version guidance.38- [`../../references/api-reference.md`](../../references/api-reference.md): signatures for `FixDQ` and `data_cleaning_suggestions`.39- [`../../references/troubleshooting.md`](../../references/troubleshooting.md): cross-cutting environment issues that can break the report path.4041## Use these scripts4243- Run [`scripts/fixdq_smoke.py`](scripts/fixdq_smoke.py) to verify that `FixDQ` and `data_cleaning_suggestions` can be imported and exercised on a tiny DataFrame.44- If the failure is really plot rendering or `chart_format`, switch to the EDA sub-skill and run its smoke script.45- If the failure looks like a package install issue, run [`../../scripts/inspect_install.py`](../../scripts/inspect_install.py) first.4647## Important compatibility facts4849- `data_cleaning_suggestions` delegates to `pandas_dq.dq_report`.50- This repository version works with pandas 2.x; pandas 3.x removed `DataFrame.applymap`, which can break `pandas_dq`.51- `pandas_dq` imports `IPython.display`, so a non-notebook environment may still need `IPython` installed.52- `FixDQ.__init__` accepts `quantile`, `cat_fill_value`, `num_fill_value`, `rare_threshold`, and `correlation_threshold`.53- The report path is still useful even when the user never wants plots.5455## Issues the report can surface5657- duplicate rows or duplicate columns58- zero-variance features59- rare categories60- high-cardinality features61- infinite values62- mixed Python types in a single column63- skewed distributions64- highly correlated features or leakage65- imbalanced classes66- target-related issues when a target column is supplied6768## Cross-routing6970- If the user asks for saved charts or automated EDA plots after cleaning, route to [`../eda-visualization/SKILL.md`](../eda-visualization/SKILL.md).71- If the data-quality issue is specific to long text columns or wordcloud behavior, route to [`../text-wordclouds/SKILL.md`](../text-wordclouds/SKILL.md).72- Keep dependency/environment fixes in references; do not leak private inspection-environment paths.73- If the user wants to apply the same cleanup to train and test data, emphasize `FixDQ` over the report-only helper.7475## Troubleshooting reminders7677- If the report fails at import time, check `IPython` first, then `pandas` version, then XGBoost/setuptools interactions.78- If a tiny sample gives odd warnings, explain that the dataset may be too small to classify reliably.79- If the target column is missing or misspelled, verify the exact column name before retrying.80- If the result object is a `Styler` or other display wrapper, describe that the report succeeded even if the object is not a plain DataFrame.8182## Escalation8384If the user wants to continue from the report into plotting, route back to the EDA sub-skill with the cleaned DataFrame.85If the user wants text-column advice rather than numeric or categorical cleanup, route to the text sub-skill instead of stretching this one.