What is Data Wrangling?

An analyst pulls orders from a web shop export, a marketplace report and a point-of-sale system. Dates arrive in three formats, one file stores prices with currency symbols, and the marketplace report has no customer IDs. Before a dashboard or model can use the data, someone has to make the files agree.

Hadley Wickham’s 2014 paper Tidy Data in the Journal of Statistical Software opens by noting that a huge amount of effort is spent cleaning data to get it ready for analysis. The paper proposes a target structure: each variable is a column, each observation is a row, and each type of observational unit is a table.

Wrangling starts with the file, not its description. When CUBIG analyzed the UCI Online Retail dataset (November 2026), 135,080 of 541,909 transaction rows, 24.93%, had no customer ID, although the repository’s metadata answers “No” to “Has Missing Values?”. The analysis is described in missing data in sales records.

Common wrangling steps:

  • combining files, by stacking rows from similar sources or joining tables on a shared key
  • fixing formats, such as dates, currency symbols, units and inconsistent category labels
  • handling missing and invalid values, by filling, flagging or excluding them
  • reshaping tables so that each row is one observation, and recording which steps were applied

How is data wrangling different from data cleaning?

  • Data cleaning fixes errors in values: typos, duplicates, invalid entries and gaps.
  • Data wrangling is the wider job of getting data into a usable shape, which includes cleaning as well as combining, reshaping and enriching.
  • ETL pipelines automate many of the same steps for recurring loads, while wrangling often refers to the exploratory work of figuring out which steps a dataset needs.

Where does data wrangling break in AI work?

Data wrangling breaks when steps are applied without a record. A spreadsheet that has been sorted, filtered, filled and merged by hand can look clean while nobody can say which rows were removed or which values were estimated, and the same steps cannot be repeated on next month’s data.

A wrangling step can also suit one task and harm another. Dropping the rows without a customer ID is a common step for customer-level analysis of the UCI Online Retail data, yet the same rows carry 14.85% of the file’s net sales value. In CUBIG’s Syntitan, Ready for Raw Data keeps the original dataset unchanged and records each processing step, with its reason and before-and-after examples, in a new Version.

CUBIG Shorts

Enough for a Monthly Summary, Not for Predicting Failures

A short take on preparing for the task: records that are enough for a monthly summary may still lack the examples a prediction needs.

▶  Watch on YouTubeSubscribe

Frequently asked questions

Is data wrangling the same as data munging?

Largely. Data munging is an informal term often used interchangeably with data wrangling for the work of reshaping and cleaning raw data into a usable form.

Is data wrangling the same as ETL?

They overlap. ETL usually refers to automated, recurring pipelines that extract, transform and load data, while data wrangling often describes the hands-on work of exploring and preparing a dataset for a particular analysis.

Why does data wrangling matter for AI?

A model learns from whatever the prepared data contains. Undocumented wrangling steps, such as rows dropped or values filled, change what the model sees and make results hard to check or reproduce.