Skip to Main Content

Cleaning Spreadsheet Data with OpenRefine

This guide accompanies the Galter Health Sciences Library class of the same name, or can be used on its own to learn the basic functions of OpenRefine. The class and guide are adapted from Library Carpentry OpenRefine, Copyright 2016-2019

Joining Multi-Valued Cells

Just as we can split up cells that have two types of values, or two different types of data, we can also join up rows into multi-valued cells. If you completed the cell-splitting exercise on the Narrative_1 column of the sample dataset, we will build on that and re-join the cells we split.

From the drop down menu at the top of the Narrative_1 column, choose Edit Cells, then Join Multi-Valued Cells.

Screenshot showing the OpenRefine menu path for joining multi-valued cells

 

The dialog box that pops up will ask what separator you would like to add between the two distinct values you are about to join. You can choose any number, letter, or symbol you would like. Using the double carat (>>) will restore the Narrative_1 cells to the way they originally appeared.

This exercise works because there was pre-existing data in multiple pre-separated rows, which could be joined back up to the parent records.