user1781186
user1781186

Reputation:

Cells to columns in OpenRefine

I've got a dataset in CSV that I want to convert to JSON. Before conversion, I need to reformat the data to get the proper multidimensional structure. The data contains the results of the last election in Sweden, and it is divided by county ("Kommun"). There are 291 counties, and 9 parties. I want:

This would result in 10 columns (county + parties) and 291 rows (1 per county).

How do I achieve this using Open Refine/Google Refine? My current data is shown in the image below.

Open Refine print screen

Upvotes: 1

Views: 958

Answers (1)

Tom Morris
Tom Morris

Reputation: 10540

Transpose -> Columnize by key/value should do the trick.

Upvotes: 3

Related Questions