Count the number of rows for each group when we have GroupedData
input. The resulting SparkDataFrame will also contain the grouping columns.
This can be used as a column aggregate function with Column
as input, and returns the number of items in a group.
count(x)
n(x)
# S4 method for class 'GroupedData'
count(x)
# S4 method for class 'Column'
count(x)
# S4 method for class 'Column'
n(x)
Arguments
a GroupedData or Column.
count since 1.4.0
count since 1.4.0
n since 1.4.0
Examplesif (FALSE) { # \dontrun{
count(groupBy(df, "name"))
} # }
if (FALSE) count(df$c) # \dontrun{}
if (FALSE) n(df$c) # \dontrun{}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4