Skip to content
Snippets Groups Projects
Commit 81ea42bf authored by Wenchen Fan's avatar Wenchen Fan Committed by Reynold Xin
Browse files

[SQL][Minor] fix java doc for DataFrame.agg

Author: Wenchen Fan <cloud0fan@outlook.com>

Closes #5712 from cloud-fan/minor and squashes the following commits:

be23064 [Wenchen Fan] fix java doc for DataFrame.agg
parent 3df9c5dd
No related branches found
No related tags found
No related merge requests found
...@@ -623,17 +623,12 @@ class DataFrame private[sql]( ...@@ -623,17 +623,12 @@ class DataFrame private[sql](
} }
/** /**
* (Scala-specific) Compute aggregates by specifying a map from column name to * (Scala-specific) Aggregates on the entire [[DataFrame]] without groups.
* aggregate methods. The resulting [[DataFrame]] will also contain the grouping columns. * {{
* * // df.agg(...) is a shorthand for df.groupBy().agg(...)
* The available aggregate methods are `avg`, `max`, `min`, `sum`, `count`. * df.agg("age" -> "max", "salary" -> "avg")
* {{{ * df.groupBy().agg("age" -> "max", "salary" -> "avg")
* // Selects the age of the oldest employee and the aggregate expense for each department * }}
* df.groupBy("department").agg(
* "age" -> "max",
* "expense" -> "sum"
* )
* }}}
* @group dfops * @group dfops
*/ */
def agg(aggExpr: (String, String), aggExprs: (String, String)*): DataFrame = { def agg(aggExpr: (String, String), aggExprs: (String, String)*): DataFrame = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment