Remove/Collapse blank cells in a Column.

350 views
Skip to first unread message

jred...@alumnos.unex.es

unread,
Feb 10, 2014, 7:22:58 AM2/10/14
to openr...@googlegroups.com

The task is simple to understand, I have a table like this:

table 1

And I would like to edit the column "L1_latitud" to collapse (or remove) all the blank cells:

table2

It looks like a simple task but I can't find out a way to deal with it.

Many thanks,

Jesús Redondo


PD.If someone interested, this has been also posted [in  Stackoverflow](http://stackoverflow.com/questions/21676700/open-refine-google-refine-remove-blank-cells-in-a-column), so you can answer there.

Tom Morris

unread,
Feb 10, 2014, 9:52:22 AM2/10/14
to openr...@googlegroups.com
Here's what I posted to StackOverflow (but this is probably a better forum for discussing it, since it's more a tool question than a programming question):

"Not sure this is a programming question, but if what you show is a single Refine record (you can check by switching from Row mode to Record mode for viewing), you should be able to use "Join multi-valued" cells to collapse all the values into a single string with separators.  From there the split(), filter(), join() methods would allow you to filter out the empty values and put the string back together.  Finally, "Split multi-valued cells" would split them out into separate cells again.

"I sense that you've already done some processing here, so there might be an easier way to do this if you started a step or two earlier in the process."

If it turns out that Refine doesn't think what you have in your images is a single record, the first step will be to get rearrange the columns so that it thinks the rows are a record (although I suspect you are all set in that regard).

Tom


--
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.
For more options, visit https://groups.google.com/groups/opt_out.

jred...@alumnos.unex.es

unread,
Feb 11, 2014, 4:55:57 AM2/11/14
to openr...@googlegroups.com

Hello Tom,

Yes, it worked like a charm. Thank you.

Jesús.
Reply all
Reply to author
Forward
0 new messages