Skip to contents

Returns the number of rows in a SparkDataFrame

Usage

# S4 method for SparkDataFrame
count(x)

# S4 method for SparkDataFrame
nrow(x)

Arguments

x

a SparkDataFrame.

Note

count since 1.4.0

nrow since 1.5.0

Examples

if (FALSE) {
sparkR.session()
path <- "path/to/file.json"
df <- read.json(path)
count(df)
}