【发布时间】:2015-10-01 14:40:20
【问题描述】:
我会以这个问题为基础,类似于Remove Rows From Data Frame where a Row match a String
例如:
A,B,org.id
4,3,Foo
2,3,Bar
2,4,Bar
7,5,Zap
7,4,Zap
7,3,Zap
我将如何返回一个排除所有 org.id 与上述行相同的行的数据框?
A,B,org.id
4,3,Foo
2,3,Bar
7,5,Zap
猜测:也许 melt() 或 cast() 函数可以解决问题。 (我只知道如何在 excel 中执行此操作,我必须在其中创建一个新数据框并执行 IF[a2=a1,0,a2]。)
这个问题也类似于Subtract the previous row of data where the id is the same as the row above,但那是在sql中。
【问题讨论】: