Trouble splitting multi-valued cells

140 views
Skip to first unread message

Katherine Akers

unread,
May 25, 2021, 12:57:36 PM5/25/21
to OpenRefine
Hi all, 

I have a column titled "Authors" with multiple author names in each cell separated by a "|" character (see attached before_split.png). I select Edit cells --> Split multi-valued cells --> by separator "|". OpenRefine splits the cells as instructed, but each author name immediately becomes a separate record rather than a separate row within a record (see attached after_split.png). I want to keep the original records intact so that I can re-join the multi-valued cells after cleaning the author names. What am I doing wrong?

Thanks!
Katherine
after_split.png
before_split.png

Isao Matsunami

unread,
May 25, 2021, 9:55:40 PM5/25/21
to openr...@googlegroups.com
A record is recognized as a new record (!?) with "non-blank cell at
the first column " And following rows with blank first column as the
same record.

So in this case, you should at first move an identifier column
(presumable title or ISBN) to the first column.
Then split authors => clean names => Merge names as you did.
You could keep other data in the consistent "record".

How about this?

*************************************************
松波 功 Isao Matsunami
mail: isa...@on.rim.or.jp PGP:1DF1 4682
*************************************************

2021年5月26日(水) 1:57 Katherine Akers <kga...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "OpenRefine" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openrefine/e3abe2ad-eb0d-4d1f-9bba-a59a1a21e5b7n%40googlegroups.com.

Jevon, Graham

unread,
May 26, 2021, 4:09:28 AM5/26/21
to openr...@googlegroups.com
If you don't have a reliable unique identifier column to represent the record structure, one way that I solve this is to create a new column with the expression row.index, then move that column to the beginning.
> To view this discussion on the web visit https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fopenrefine%2Fe3abe2ad-eb0d-4d1f-9bba-a59a1a21e5b7n%2540googlegroups.com&amp;data=04%7C01%7C%7C240b8a6874a74eaa537c08d91fe95e4b%7C21a44cb7f9c34f009afabd1e8e88bcd9%7C0%7C0%7C637575909690687288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=27lQWXXBd2c7ZMEtU4BIcWxo7oGiMeL28NOijhwkFPA%3D&amp;reserved=0.

--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.
To view this discussion on the web visit https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fopenrefine%2FCAA6eg%253DB%253DberSd7CTc6k0OjUjBkC25x__UzR2B%253D6kVfJOX480DQ%2540mail.gmail.com&amp;data=04%7C01%7C%7C240b8a6874a74eaa537c08d91fe95e4b%7C21a44cb7f9c34f009afabd1e8e88bcd9%7C0%7C0%7C637575909690687288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=qctW7SEyOKywGWeMr4ewq36zK%2Bb1iqIdk3UyZV7sOo8%3D&amp;reserved=0.


******************************************************************************************************************
Experience the British Library online at www.bl.uk<http://www.bl.uk/>
The British Library’s latest Annual Report and Accounts : www.bl.uk/aboutus/annrep/index.html<http://www.bl.uk/aboutus/annrep/index.html>
Help the British Library conserve the world's knowledge. Adopt a Book. www.bl.uk/adoptabook<http://www.bl.uk/adoptabook>
The Library's St Pancras site is WiFi - enabled
*****************************************************************************************************************
The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the postm...@bl.uk<mailto:postm...@bl.uk> : The contents of this e-mail must not be disclosed or copied without the sender's consent.
The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author.
*****************************************************************************************************************
Think before you print

Katherine Akers

unread,
May 27, 2021, 5:34:20 PM5/27/21
to OpenRefine
Creating a unique identifier column worked! Thanks all!

Katherine

Reply all
Reply to author
Forward
0 new messages