Skip to main content

Bulk Replace

This task allows for one or more group of values to be replaced by a single value in a column. This task comes with the capability automatically to find words that have similar spellings.

When to use

  • When you have data that contains data entry errors.
  • When you want to categorise a bunch of values into one.

Quickstart

Let us start with the following data

YearCountry
1970brazil
1974west germany
1978Argentina
1982italy
1986Argentina
1990west germany
1994BRAZIL
1998France
2002Brazil
2006Italy
2010SPAIN
2014Germany
2018france

Looks like there are multiple variants of spellings in data for the same countries. We can fix this by doing the following.

  1. Go to Transform > Label, Filter and Replace.
  2. Click on the Bulk Replace option.
  3. Select the column Country.
  4. Mammoth will list down all the unique values in data.
  5. It will auto suggest that 4 bucket suggestions found.
  6. Click on Autofill. This will create 4 buckets where words with similar spellings are grouped together.
  7. Click APPLY.

Data will now look like this:

YearCountry
1970brazil
1974west germany
1978Argentina
1982italy
1986Argentina
1990west germany
1994brazil
1998france
2002brazil
2006italy
2010SPAIN
2014Germany
2018france

We can then use the Text Transform task to make data more consistent.

Supported Options

The following options are supported.

  1. Column: The column on which the bulk replace operation is to be performed.
  2. Search & Replace Groups: The words grouped together to be searched for and replaced.

Fuzzy Suggestions & Automatic Grouping

Mammoth comes with the ability to automatically group words that look similar. This uses internally the Levenshtein distance algorithm to determine which words are closer to each other.

It is advisable to always verify the suggestions before applying the task.