title: How to use dataset to groupby
body: <p>I have a request to use rdd to do so：</p>
  <pre><code>val test = Seq((&quot;New York&quot;, &quot;Jack&quot;),
      (&quot;Los Angeles&quot;, &quot;Tom&quot;),
      (&quot;Chicago&quot;, &quot;David&quot;),
      (&quot;Houston&quot;, &quot;John&quot;),
      (&quot;Detroit&quot;, &quot;Michael&quot;),
      (&quot;Chicago&quot;, &quot;Andrew&quot;),
      (&quot;Detroit&quot;, &quot;Peter&quot;),
      (&quot;Detroit&quot;, &quot;George&quot;)
    )
  sc.parallelize(test).groupByKey().mapValues(_.toList).foreach(println)
  </code></pre>
  <p>The result is that：</p>
  <blockquote>
  <p>(New York,List(Jack))</p>
  <p>(Detroit,List(Michael, Peter, George))</p>
  <p>(Los Angeles,List(Tom))</p>
  <p>(Houston,List(John))</p>
  <p>(Chicago,List(David, Andrew))</p>
  </blockquote>
  <p>How to do it use dataset with spark2.0?</p>
  <p>I have a way to use a custom function, but the feeling is so complicated, there is no simple point method？</p>