title: 'GroupedData' object has no attribute 'show' when doing doing pivot in spark dataframe
body: <p>I want to pivot a spark dataframe, I refer  <a href="https://spark.apache.org/docs/1.6.0/api/python/pyspark.sql.html#pyspark.sql.DataFrame" rel="noreferrer">pyspark documentation</a>, and based on <code>pivot</code> function, the clue is <code>.groupBy('name').pivot('name', values=None)</code>. Here's my dataset,</p>
  
  <pre><code> In[75]:  spDF.show()
   Out[75]:
  
  +-----------+-----------+
  |customer_id|       name|
  +-----------+-----------+
  |      25620| MCDonnalds|
  |      25620|  STARBUCKS|
  |      25620|        nan|
  |      25620|        nan|
  |      25620| MCDonnalds|
  |      25620|        nan|
  |      25620| MCDonnalds|
  |      25620|DUNKINDONUT|
  |      25620|   LOTTERIA|
  |      25620|        nan|
  |      25620| MCDonnalds|
  |      25620|DUNKINDONUT|
  |      25620|DUNKINDONUT|
  |      25620|        nan|
  |      25620|        nan|
  |      25620|        nan|
  |      25620|        nan|
  |      25620|   LOTTERIA|
  |      25620|   LOTTERIA|
  |      25620|  STARBUCKS|
  +-----------+-----------+
  only showing top 20 rows
  </code></pre>
  
  <p>And then I try to di pivot the table name</p>
  
  <pre><code>In [96]:
  spDF.groupBy('name').pivot('name', values=None)
  Out[96]:
  &lt;pyspark.sql.group.GroupedData at 0x7f0ad03750f0&gt;
  </code></pre>
  
  <p>And when I try to show them</p>
  
  <pre><code>In [98]:
  spDF.groupBy('name').pivot('name', values=None).show()
  Out [98]:
  
      ---------------------------------------------------------------------------
  AttributeError                       Traceback (most recent call last)
  &lt;ipython-input-98-94354082e956&gt; in &lt;module&gt;()
  ----&gt; 1 spDF.groupBy('name').pivot('name', values=None).show()
  AttributeError: 'GroupedData' object has no attribute 'show'
  </code></pre>
  
  <p>I don't know why <code>'GroupedData'</code> can't be shown, what should I do to solve the issue?</p>