You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Neal Yin <ne...@workday.com> on 2015/03/31 02:12:23 UTC
data frame API, change groupBy result column name
I ran a line like following:
tb2.groupBy("city", "state").avg("price").show
I got result:
city state AVG(price)
Charlestown New South Wales 1200.0
Newton ... MA 1200.0
Coral Gables ... FL 1200.0
Castricum Noord-Holland 1200.0
Ornex Rhone-Alpes 1200.0
How do I change the column name "AVG(price)" to something more readable?
Thanks,
-Neal