Logo von Data Wrangling

Data Wrangling

Community
Tibsfox
data-wrangling

Data cleaning, transformation, reshaping, joins, missing data handling, and tidy data principles. Covers the full pipeline from raw ingestion to analysis-ready datasets -- type coercion, deduplication, outlier detection, normalization, melting/pivoting, regex extraction, and reproducible transformation chains. Use when preparing, cleaning, or transforming data for analysis.

Übersicht

HerausgeberTibsfox
Repositorygsd-skill-creator
Skill-Namedata-wrangling
Sterne
70
Forks
9
Mitgelieferte Dateien
Nur Anweisungen
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von Tibsfox auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Data Wrangling in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/Tibsfox/gsd-skill-creator/tree/main/examples/skills/data-science/data-wrangling
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Tibsfox/gsd-skill-creator.git /tmp/gsd-skill-creator
mkdir -p .claude/skills
cp -r /tmp/gsd-skill-creator/examples/skills/data-science/data-wrangling .claude/skills/data-wrangling
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Data Wrangling in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Data Wrangling automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Data Wrangling nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Data Wrangling

Data wrangling is the work that sits between raw data and analysis -- the unglamorous, indispensable practice of making data trustworthy. Estimates vary, but practitioners consistently report that 60-80% of analysis time is spent wrangling. This skill covers the principles and techniques of data cleaning, transformation, reshaping, and integration, grounded in Hadley Wickham's tidy data framework and extended to the realities of messy real-world datasets.

Agent affinity: tukey (EDA-driven cleaning), nightingale (routing wrangling tasks)

Concept IDs: data-data-sources, data-data-quality, data-sampling-bias

The Wrangling Pipeline

StageGoalKey operations
1. IngestionGet data into a working environmentRead CSV/JSON/Parquet/SQL, handle encodings, parse dates
2. ProfilingUnderstand what you haveShape, dtypes, nulls, distributions, cardinality
3. CleaningFix structural problemsDedup, type coercion, standardize categories, fix encodings
4. Missing dataHandle gapsDetect patterns (MCAR/MAR/MNAR), impute or flag
5. TransformationDerive analysis-ready featuresNormalize, bin, log-transform, create indicators
6. ReshapingMatch the analysis structureMelt, pivot, tidy form, denormalize
7. IntegrationCombine sourcesJoins (inner/left/right/full/cross), concatenation, dedup post-join
8. ValidationConfirm readinessSchema checks, assertion tests, row-count reconciliation

Tidy Data Principles

Hadley Wickham (2014) formalized "tidy data" as three rules:

  1. Each variable forms a column. A single column should contain values of exactly one variable.
  2. Each observation forms a row. A single row should contain all values for exactly one observational unit.
  3. Each type of observational unit forms a table. Mixing patient demographics and lab results in one table violates this rule.

Most messy datasets violate one or more of these rules in predictable ways:

ViolationExampleFix
Column headers are values, not variable namesColumns: income_2020, income_2021, income_2022Melt to columns: year, income
Multiple variables stored in one column"M-25" encodes both sex and ageSplit into sex and age columns
Variables stored in both rows and columnsPivot table with row headers as categoriesMelt and re-pivot to tidy form
Multiple types in one tablePatient info mixed with visit recordsNormalize into two related tables
One type spread across multiple tablesMonthly CSV files with identical schemaConcatenate with a month column

Tidy data is not the only valid structure -- wide formats are sometimes more efficient for computation or display. But tidy form is the canonical starting point for analysis, and most tools (ggplot2, pandas groupby, SQL aggregation) assume it.

Cleaning Techniques

Type Coercion

Raw data arrives as strings. Coercion converts to the correct type:

  • Numeric: Strip currency symbols, commas, whitespace. Handle locale-specific decimals (, vs .). Flag non-numeric values rather than silently converting to NaN.
  • Dates: Parse with explicit format strings, never rely on automatic detection. Time zones matter -- store in UTC, display in local.
  • Categorical: Standardize case, strip whitespace, map synonyms ("USA", "US", "United States" -> "US"). Use controlled vocabularies where possible.
  • Boolean: Map common representations ("yes"/"no", "1"/"0", "true"/"false", "Y"/"N") to a single canonical form.

Deduplication

Exact duplicates are trivial to detect. The hard cases are near-duplicates:

  • Record linkage: When the same entity appears with slight variations ("John Smith" vs "J. Smith" vs "SMITH, JOHN"). Use fuzzy matching (Levenshtein distance, phonetic encoding) with a human-reviewed threshold.
  • Temporal duplicates: The same event recorded at slightly different timestamps. Define a dedup window and keep the first/last/most-complete record.
  • Key discipline: Always define what constitutes a unique observation before deduplication. A table of purchases has a different uniqueness key than a table of customers.

Outlier Detection

Outliers are not errors -- they are values that warrant investigation:

  • Statistical: Values beyond 1.5 * IQR (Tukey's fences), or beyond 3 standard deviations. These thresholds are guidelines, not laws.
  • Domain-based: A human age of 150 is an error. A human age of 95 is unusual but valid. Domain knowledge trumps statistical rules.
  • Multivariate: A value can be normal on each variable individually but extreme in combination (e.g., age 25 with 40 years of work experience). Mahalanobis distance or isolation forests detect these.

Action on outliers: Investigate first. If the value is a data entry error, correct it. If it is a measurement error, flag it. If it is a genuine extreme value, keep it and note its influence on summary statistics.

Missing Data

Missing Data Mechanisms

Rubin (1976) classified three mechanisms:

MechanismDefinitionExampleImplication
MCARMissingness is unrelated to any variableLab sample randomly droppedSafe to drop or impute; no bias
MARMissingness depends on observed variablesHigh-income respondents skip income question less oftenImputation using observed predictors is valid
MNARMissingness depends on the missing value itselfPeople with depression less likely to report depression severityNo imputation is fully valid; requires sensitivity analysis

Handling Strategies

StrategyWhen to useTrade-off
Listwise deletionMCAR, small fraction missing (<5%)Simple but loses observations
Pairwise deletionMCAR, different analyses need different subsetsKeeps more data but correlation matrices may not be positive-definite
Mean/median imputationQuick exploration onlyReduces variance, biases correlations toward zero
Regression imputationMAR, continuous variablesBetter than mean but inflates R-squared
Multiple imputationMAR, formal inferenceGold standard; accounts for imputation uncertainty
Indicator methodAny mechanism, tree-based modelsAdd a binary "was_missing" column; let the model learn missingness patterns
Domain-specific fillKnown defaults"No response" for surveys, 0 for counts that should exist

Joins and Integration

Join Types

JoinKeepsUse when
InnerRows matching in both tablesYou only want complete matches
LeftAll rows from left, matching from rightLeft table is the primary; right is enrichment
RightAll rows from right, matching from leftSymmetric to left join
Full outerAll rows from bothYou need the complete picture of both sources
CrossEvery combination of left and right rowsGenerating all pairs (e.g., all product-store combinations)
AntiLeft rows with NO match in rightFinding orphans or gaps

Join Hazards

  • Many-to-many joins: Produce a Cartesian product of matching rows. Row count explodes. Always check cardinality before joining.
  • Key mismatches: Different key formats ("001" vs 1), trailing whitespace, case differences. Standardize keys before joining.
  • Null keys: NULLs never match other NULLs in standard SQL joins. Decide how to handle null-keyed rows explicitly.
  • Post-join dedup: Joins can introduce duplicates when key relationships are not 1:1. Validate row counts after every join.

Transformation Techniques

Normalization and Scaling

MethodFormulaUse when
Min-max(x - min) / (max - min)Need values in [0, 1]; distribution shape preserved
Z-score(x - mean) / stdNeed zero-centered data; assumes roughly normal
Robust scaling(x - median) / IQROutliers present; median/IQR resistant to extremes
Log transformlog(x + 1)Right-skewed data; multiplicative relationships

Binning and Discretization

  • Equal-width: Divide range into n bins of equal size. Simple but poor for skewed data.
  • Equal-frequency (quantile): Each bin contains approximately the same number of observations. Better for skewed data.
  • Domain-driven: Age groups (0-17, 18-34, 35-54, 55+), income brackets, clinical thresholds. Always preferred when domain knowledge exists.

Feature Engineering

Feature engineering is the creative step where domain knowledge becomes computable:

  • Date decomposition: Extract year, month, day-of-week, is-weekend, days-since-event.
  • Text extraction: Regex for structured patterns (phone numbers, ZIP codes, email domains).
  • Interaction terms: Product of two variables when their combination matters (e.g., age * income).
  • Aggregation: Group-level statistics (customer's average order size, store's monthly variance).
  • Lag features: Previous period's value for time series (yesterday's temperature, last month's sales).

Reproducibility

A wrangling pipeline is only trustworthy if it is reproducible:

  1. Script everything. No manual Excel edits. Every transformation is code.
  2. Version raw data. Hash or checksum the input files. If the raw data changes, the pipeline should detect it.
  3. Document assumptions. Why did you impute with median instead of mean? Why did you drop rows with more than 50% missing? Write it down.
  4. Test transformations. Assert expected row counts, column types, value ranges, and null counts at each stage.
  5. Separate raw from derived. Never overwrite raw data. Produce a new file or table at each stage.

Common Mistakes

MistakeWhy it failsFix
Imputing before exploringYou do not know the missingness mechanismProfile first, then choose strategy
Joining without checking cardinalityMany-to-many join silently explodes row countCheck key uniqueness before joining
Dropping outliers without investigationOutliers may be the most important observationsInvestigate, then decide
Mixing cleaning and analysisImpossible to reproduce or auditSeparate wrangling script from analysis
Ignoring encoding issuesGarbled text, silent data lossSpecify encoding explicitly at ingestion
Normalizing before train/test splitData leakage -- test set statistics influence trainingFit scaler on training data only

Cross-References

  • tukey agent: Exploratory data analysis techniques that drive cleaning decisions. Primary agent for profiling and outlier investigation.
  • breiman agent: Machine learning pipelines that consume wrangled data. Feature engineering feeds directly into model training.
  • fisher agent: Experimental design that determines what data needs collecting and how.
  • statistical-modeling skill: Regression and inference methods that require clean, properly typed data.
  • ethics-governance skill: Privacy and consent considerations during data collection and integration.

References

  • Wickham, H. (2014). "Tidy Data." Journal of Statistical Software, 59(10), 1-23.
  • Rubin, D. B. (1976). "Inference and Missing Data." Biometrika, 63(3), 581-592.
  • Van Buuren, S. (2018). Flexible Imputation of Missing Data. 2nd edition. CRC Press.
  • Dasu, T. & Johnson, T. (2003). Exploratory Data Mining and Data Cleaning. Wiley.
  • Tukey, J. W. (1977). Exploratory Data Analysis. Addison-Wesley.

Häufig gestellte Fragen

Was macht der KI-Skill Data Wrangling?

Data cleaning, transformation, reshaping, joins, missing data handling, and tidy data principles. Covers the full pipeline from raw ingestion to analysis-ready datasets -- type coercion, deduplication, outlier detection, normalization, melting/pivoting, regex extraction, and reproducible transformation chains. Use when preparing, cleaning, or transforming data for analysis.

Warum Data Wrangling in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Data Wrangling besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Data Wrangling in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/Tibsfox/gsd-skill-creator/tree/main/examples/skills/data-science/data-wrangling ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Data Wrangling nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Data Wrangling verwenden?

So viele Sie möchten. In TypingMind können Sie Data Wrangling mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Data Wrangling kostenlos?

Der Skill wird von Tibsfox auf GitHub veröffentlicht. Prüfen Sie im Repository, ob dort Lizenzbedingungen angegeben sind. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇