函数sparkR中的Drop列
假设我想编写一个函数从SparkR数据帧(版本1.6.0)中删除一列:函数sparkR中的Drop列,r,apache-spark,sparkr,R,Apache Spark,Sparkr,假设我想编写一个函数从SparkR数据帧(版本1.6.0)中删除一列: dropColumn目前在dataframe中没有方便的方法来删除列。我认为,在SparkR中实施之前,这将一直有效: dropColumn <- function(df, col) { tempdf <- new("DataFrame", sdf=SparkR:::callJMethod(df@sdf, "drop", col), isCached=FALSE)
dropColumn目前在dataframe中没有方便的方法来删除列。我认为,在SparkR中实施之前,这将一直有效:
dropColumn <- function(df, col) {
tempdf <- new("DataFrame",
sdf=SparkR:::callJMethod(df@sdf, "drop", col),
isCached=FALSE)
tempdf
}
newdf <- dropColumn(inputdf, 'Email')
dropColumn目前在dataframe中没有方便的方法来删除列。我认为,在SparkR中实施之前,这将一直有效:
dropColumn <- function(df, col) {
tempdf <- new("DataFrame",
sdf=SparkR:::callJMethod(df@sdf, "drop", col),
isCached=FALSE)
tempdf
}
newdf <- dropColumn(inputdf, 'Email')
dropColumn Open JIRA,在DataFrame上实现所需的方法,制作PR?我的意思是,在这里你没什么办法。DataFrame根本没有实现[[打开JIRA,在DataFrame上实现所需的方法,创建PR?我的意思是,在这里你对此无能为力。DataFrame根本没有实现[[
dropColumn <- function(df, col) {
tempdf <- new("DataFrame",
sdf=SparkR:::callJMethod(df@sdf, "drop", col),
isCached=FALSE)
tempdf
}
newdf <- dropColumn(inputdf, 'Email')