1

I am very new at open refine and I am seeking to combine rows and columns in a spreadsheet with many duplicate values. Please find the example I am looking for below. I think it has to do with the "fill down" command, but I am not sure. Thank you very much!

    Original Table      New Table

    Name | Totals       Name|Totals
    -----|-------       ----|------
    A        5            A    15
    A        10           B    104
    B        1            C    219
    B        3
    B        100
    C        4
    C        150
    C        65
    C        0
1

1 Answer 1

1

What you want to do is basically a pivot table. It's way much simpler to do in a spreadsheet software (like Excel). But it's still feasible in OpenRefine.

  • make sure that the column "Name" is in the first position and that its values are sorted.

  • Use blank down in this column.

  • Create a new column from "Totals" and use this formula:

row.record.cells.Totals.value.sum()

  • Using a filter by blank, keep only the "Names" rows that contain a value.

  • Export the filtered rows in .csv or .xlsx.

This screencast will make things clearer.

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.