Skip to content
Learn › Clean and shape data: open the docs menu

Find and replace values and fix spelling variants

Mammoth has two replace tasks under Describe your transformation > Filter, Label & Replace > Replace. Find & Replace swaps known values for others in one or more text columns. Bulk Replace merges many variants of the same thing (such as "NYC", "New York" and "new york ") into one standard value, with AI-suggested groups and rules that catch new variants on later runs.

Choose Find & Replace or Bulk Replace

UseWhen
Find & ReplaceYou know the exact values to swap, for example "Ltd" to "Limited".
Bulk ReplaceOne concept appears in many forms: company names, product categories, status codes, location labels.

Replace specific text in one or more columns

Find & Replace configuration panel showing the multi-column selector
  1. Open Find & Replace.
  2. In Select columns, choose one or more text columns to search.
  3. Enter the Find value and what to Replace with. Either can be a Text parameter: click the Val chip and choose Parameter.
  4. To make several swaps in one task, click Add Values and add more find and replace pairs.
  5. Set the options below.
  6. Click Apply.
OptionWhat it does
Case sensitiveWhen ticked, only exact case matches are replaced.
Entire cellWhen ticked, only cells whose whole content matches are replaced. When unticked, matches inside a cell are replaced too.
Add ConditionLimits the replacement to rows that meet a condition.

Find and replace across several selected columns

In the data grid, select two or more column headers and open the multi-column menu. Choose Find & Replace. It opens with every selected TEXT column already picked, and the View's current filter as its condition. The option is disabled if no TEXT column is selected. See Work in the data grid.

Standardise spelling variants with Bulk Replace

Bulk Replace replaces every value in a group with the group's name. Values in no group stay as they are. Open it from Replace, from the AI Powered shortcuts, or from Bulk Replace in a text column's 3-dot menu.

Bulk Replace panel open showing the All Values tab with a list of unique values
  1. Pick the text column. The left side shows two tabs: All Values lists every unique value with its row count, and Group Suggestions proposes groups of values that look like variants of each other.
  2. Build groups. Each group has a Group Name, which becomes the replacement, and the values it replaces.
  3. Click Next to review the groups.
  4. Choose Place in a new column or the existing column. To touch only some rows, click the filter icon and add a condition.
  5. Click Apply, or Previous to go back.
Bulk Replace final step listing a group, with a Place in existing column control, a condition filter icon, and Cancel, Previous and Apply buttons

Bulk Replace has no live preview: check the summary after Next before you apply.

Pick values from the All Values list

Search the list, tick values, then add them to a group. Sort Alphabetically or Sort by Quantity orders the list. The Show Whitespaces button marks every space, so values that differ only by extra spaces stand out.

Let Mammoth suggest groups

Bulk Replace Group Suggestions tab listing similar values with Add suggestion buttons, and a group of similar values

The Grouping Settings menu at the top of the Group Suggestions tab sets how suggestions are made:

SettingHow it groupsUse it for
SmartUnderstands meaning and context (AI)Synonyms and abbreviations, such as "NYC" and "New York"
Spelling MatchGroups words with similar spellingTypos and small spelling differences
Similarity (default)Groups by calculated similarityA general first pass
Common PatternsGroups common word variationsValues that share most of their words, such as "Acme Inc" and "Acme Incorporated"
  • Add suggestion turns one suggestion into a group.
  • Create all Group Suggestions adds every suggestion at once.
  • Reload suggestions asks for a fresh set, for example after you change the grouping setting.

A value that already belongs to a group shows added to "West Coast" (with that group's name) beside it.

Create, rename and merge groups

The Groups list shows each group with its value count. Click a group to open it.

ControlWhat it does
Create GroupAdds an empty group named "Untitled Group". With values ticked, the button reads Add to New Group and puts them in the new group.
+ on a groupAdds the ticked values to that group (Add selected values to this group).
Edit icon beside Group NameRenames the group. Names must be unique: "Please enter a unique group name".
Trash icon (Remove Group)Takes the group out of the replacement without losing it. The restore icon (Restore Group) brings it back.
Reorder icon (Move values to another group)Starts selection mode. Pick values in the open group, then click + on the target group (Move values to this group). Exit ends selection mode.

If the same value sits in two groups, both are flagged: "This group has conflicting values with another group". Move or remove the value so it sits in one group only.

Catch new variants automatically with dynamic values

A dynamic value is a rule that adds every matching value to a group, including values that only appear in later runs. Open a group and click Add Dynamic Value ("Set a rule so matching values are added to this group").

PartWhat it does
Operatorcontains (default), is, is NOT, does NOT contain, starts with, ends with, does NOT start with, does NOT end with or is Empty
Type New ValueThe text to match. Not shown for is Empty.
Case sensitiveWhen unticked, "CAT" matches "cat".

Each rule shows how many values it matches now, for example Matches 4 values. Expand it to see them, and click the X on a match to exclude that value from the rule. The group's count shows how many values come from rules, for example "12 values (5 dynamic)".

Rules are checked every time the pipeline runs, so a new spelling that arrives next month is replaced without editing the step. A value you listed in a group always stays with that group, even if another group's rule also matches it.

For example, a group named "Acme" with the rule contains acme (Case sensitive unticked) catches "Acme Inc", "ACME Corp" and any new "acme" spelling that arrives later.

Troubleshooting replacements

Message or symptomCauseFix
"Please enter a unique group name"Another group has that nameChoose a different name
"This group has conflicting values with another group"One value is in two groupsMove or remove it so it sits in one group
"This Dynamic Value already exists."The same rule was added twiceKeep one copy
Find & Replace changed part of a wordEntire cell is untickedTick Entire cell
Find & Replace missed values with other casingCase sensitive is tickedUntick it
Find & Replace is disabled in the multi-column menuNo TEXT column is selectedAdd a TEXT column to the selection
Was this page helpful?

Something wrong? support@mammoth.io