O'Reilly logo

Using OpenRefine by Max De Wilde, Ruben Verborgh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recipe 5 – adding derived columns

Sometimes you do want to transform the contents of a cell, but also keep the original value. While you can go back to a cell's previous state using the Undo / Redo tab if something went wrong, it could be useful to see both the original value and the transformed value at the same time. Therefore, OpenRefine enables you to add a column based on another one.

Suppose we want to have a separate field that counts the number of categories per record. Click on the Categories dropdown, click on Edit column and Add column based on this column… A dialog very similar to the cell transformation dialog pops up; however, this time it additionally asks for a column name. Enter Category Count into the New column name field. Now, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required