hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neal Yin <neal....@workday.com>
Subject data frame API, change groupBy result column name
Date Tue, 31 Mar 2015 00:12:23 GMT
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





Mime
View raw message