Sonicthoughts
Sonicthoughts

Reputation: 556

Grel to apply to ALL columns or current column

I have a transposition that I'd like to apply to multiple columns. The Grel generated shows the columnName or Base name, but that means I have to edit the code for each column. Thought there was a way to find the column index and have code that would apply to the "current" column, a list of columns by index or all columns.

Specifically, I'd like to trim whitespaces and have 20+ columns.

Explored foreach and row.index but can't find anything like column index.

Upvotes: 9

Views: 433

Answers (2)

WorkBoots
WorkBoots

Reputation: 21

I have been able to trim leading and trailing white space for entire projects with OpenRefine 3.2.

A standard column gets added to all projects "all". At the top of the "all" column click the down arrow > select "Transform", then in the Expression box enter value.trim() and click ok.

Next you will be allowed to select via check box the columns you would like transformed. Click ok & that should run over all selected columns for your project.

Upvotes: 1

Tom Morris
Tom Morris

Reputation: 10540

Unfortunately multi-column operations are not supported by the current version of Refine.

Upvotes: 1

Related Questions