0

I have a single column in OpenRefine like this:

Title
A Star is born
Author
George Cukor
Date
1954
Other tags...

Data for each item begin with name of the tag (Title, Author, Date etc.), followed by a value, and every tag or value are in successive rows, around ten thousands. I would like to have as many columns as tags and as many rows as items containing title, date, author etc., something like this:

Title | Author | Date | etc.
A Star is born | George Cukor | 1954 | etc.

Any idea ? Thanks

ome
  • 11
  • 4

1 Answers1

0

This is your original dataset:

enter image description here

Use "Transpose --> Transpose cells in rows into columns" (leaving option 2 as default). You will get this:

enter image description here

Then, on the first column, apply "Transpose --> Columnize by key/value columns" and don't change the default options there either. Final result:

enter image description here

This will obviously work with more tags/columns, but only if each of them is followed by a single value.

Ettore Rizza
  • 2,800
  • 2
  • 11
  • 23
  • Thanks for your answer. The problem is that I have sometimes multiple values after each tags, more than 1 author for instance, each of them on a different row. So when applying your solution, I have shifted results. – ome Feb 12 '20 at 18:06
  • This is a solution to the problem you have described, in which it is about tags "followed by **a** value" and not "values". It is possible to find a solution to your real problem if and only if you have the complete list of possible tags. but this is another question. :) – Ettore Rizza Feb 12 '20 at 18:11
  • You're right :-) I will ask to my own question so you will better understand what I'm looking for. – ome Feb 12 '20 at 18:20
  • Please, just edit your original question or, better in this case, write a new one. Answers are answers and questions are questions. (and welcome to StackOverflow by the way). – Ettore Rizza Feb 12 '20 at 18:35