Skip to Main Content

OpenRefine

An introduction to this free, open source tool for working with "messy" data.

Combining and Splitting Cells

Combining cells:

Combining cells from the same  row into a new column requires a GREL expression. From the drop down of one of the columns you wish to alter, select "edit cells" > "transform". This will bring up a window for entering your GREL expression. 

         - Enter the expression:  value + cells[‘Column’].value

where "value" is the current column, and  'column' is the name of the column whose values you would like to combine. Note, nothing will happen if the column name is not exact. 

- You can also add additional syntax using a plus sign, such as, 

            value + "-" + cells[‘Column’].value 

to add, in this example, a dash between the content being combined. 

OpenRefine also can support splitting rows into columns, and splitting cells into columns or rows using the dropdown menu for the column.

 

Splitting cells:

Cells can be split into additional columns using a separator (often a comma, semi-colon, dash, space, or other character) or field length.

Using the dropdown menu for the column you wish split, select "edit column" > "Split into several columns". 

 

You can find more information on editing cells here.