Skip to content

Commit

Permalink
add test for agg('*')
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Feb 13, 2015
1 parent 9e214d5 commit 663d314
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/sql/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,8 @@ def agg(self, *exprs):
name to aggregate methods.
>>> gdf = df.groupBy(df.name)
>>> gdf.agg({"age": "max"}).collect()
[Row(name=u'Bob', MAX(age#0)=5), Row(name=u'Alice', MAX(age#0)=2)]
>>> gdf.agg({"*": "count"}).collect()
[Row(name=u'Bob', COUNT(1)=1), Row(name=u'Alice', COUNT(1)=1)]
>>> from pyspark.sql import functions as F
>>> gdf.agg(F.min(df.age)).collect()
Expand Down

0 comments on commit 663d314

Please sign in to comment.