agg function not working for multiple aggregations

FrancisLau
New Contributor

Data has 2 columns:

|requestDate|requestDuration|

| 2015-06-17| 104|

Here is the code:

avgSaveTimesByDate = gridSaves.groupBy(gridSaves.requestDate).agg({"requestDuration": "min", "requestDuration": "max","requestDuration": "avg"})

avgSaveTimesByDate.show(100)

Summary of Issue

I expect 4 columns of data: date, min, max and average but only the date and average shows. The first 2 aggs do not show up. If I move max to the last position, only date and max shows up. Very weird.

+-----------+--------------------+ |requestDate|AVG(requestDuration)| +-----------+--------------------+

| 2015-06-10| 750.8886326991035|

Am I doing this incorrectly? I am trying to get a dataframe for a box plot.