Description Usage Arguments Value Note See Also Examples
Selects a set of columns with names or Column expressions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | select(x, col, ...)
## S4 method for signature 'SparkDataFrame'
x$name
## S4 replacement method for signature 'SparkDataFrame'
x$name <- value
## S4 method for signature 'SparkDataFrame,character'
select(x, col, ...)
## S4 method for signature 'SparkDataFrame,Column'
select(x, col, ...)
## S4 method for signature 'SparkDataFrame,list'
select(x, col)
|
x |
a SparkDataFrame. |
col |
a list of columns or single Column or name. |
... |
additional column(s) if only one column is specified in |
name |
name of a Column (without being wrapped by |
value |
a Column or an atomic vector in the length of 1 as literal value, or |
A new SparkDataFrame with selected columns.
$ since 1.4.0
$<- since 1.4.0
select(SparkDataFrame, character) since 1.4.0
select(SparkDataFrame, Column) since 1.4.0
select(SparkDataFrame, list) since 1.4.0
Other SparkDataFrame functions:
SparkDataFrame-class,
agg(),
alias(),
arrange(),
as.data.frame(),
attach,SparkDataFrame-method,
broadcast(),
cache(),
checkpoint(),
coalesce(),
collect(),
colnames(),
coltypes(),
createOrReplaceTempView(),
crossJoin(),
cube(),
dapplyCollect(),
dapply(),
describe(),
dim(),
distinct(),
dropDuplicates(),
dropna(),
drop(),
dtypes(),
exceptAll(),
except(),
explain(),
filter(),
first(),
gapplyCollect(),
gapply(),
getNumPartitions(),
group_by(),
head(),
hint(),
histogram(),
insertInto(),
intersectAll(),
intersect(),
isLocal(),
isStreaming(),
join(),
limit(),
localCheckpoint(),
merge(),
mutate(),
ncol(),
nrow(),
persist(),
printSchema(),
randomSplit(),
rbind(),
rename(),
repartitionByRange(),
repartition(),
rollup(),
sample(),
saveAsTable(),
schema(),
selectExpr(),
showDF(),
show(),
storageLevel(),
str(),
subset(),
summary(),
take(),
toJSON(),
unionAll(),
unionByName(),
union(),
unpersist(),
withColumn(),
withWatermark(),
with(),
write.df(),
write.jdbc(),
write.json(),
write.orc(),
write.parquet(),
write.stream(),
write.text()
Other subsetting functions:
filter(),
subset()
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.