OpenRefine: 'Fill Up' 替换一列中的值

标签 openrefine google-refine grel

我有下表

╔════════╦════════╦════════╦════════╗
║ record ║ Brand  ║ Model  ║ Spec   ║
╠════════╬════════╬════════╬════════╣
║   1    ║   X    ║ null   ║ 1      ║
║        ║   X    ║ DF     ║ 3      ║
║        ║   X    ║ null   ║ 5      ║
║   2    ║   Y    ║ null   ║ 1      ║
║        ║   Y    ║ AB     ║ 3      ║
║        ║   Y    ║ null   ║ 5      ║
╚════════╩════════╩════════╩════════╝

并希望获得关注

╔════════╦════════╦════════╦════════╗
║ record ║ Brand  ║ Model  ║ Spec   ║
╠════════╬════════╬════════╬════════╣
║   1    ║   X    ║ DF     ║ 1      ║
║        ║   X    ║ DF     ║ 3      ║
║        ║   X    ║ DF     ║ 5      ║
║   2    ║   Y    ║ AB     ║ 1      ║
║        ║   Y    ║ AB     ║ 3      ║
║        ║   Y    ║ AB     ║ 5      ║
╚════════╩════════╩════════╩════════╝

即。我梦想着类似 fill down tutorial 的“填满”类似物

我还没有找到涵盖开箱即用的功能。 您有更多信息吗?

最佳答案

你能尝试一下这个快速技巧吗?

(在“模型”列上使用转换)

row.record.cells['Model'].value[0]

这是我使用的数据集

record,Brand,Model,Spec
1,X,,1
,X,DF,3
,X,,5
2,Y,,1
,Y,AB,3
,Y,,5

演示

enter image description here

关于OpenRefine: 'Fill Up' 替换一列中的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50027129/

相关文章:

cluster-analysis - Openrefine:跨集群两个数据集

mod-proxy - Mod_Proxy 无法正确显示 OpenRefine 应用程序

regex - 删除最外面的括号

Google Refine 中 value.contains() 的正则表达式

openrefine - 简单的 OpenRefine IF 来创建一个新列

openrefine - 如何根据 OpenRefine 中的位置添加字符串字符?

json - 在 GREL 中解析多值 JSON (OpenRefine)