title: Pandas groupby throws: TypeError: unhashable type: 'numpy.ndarray'
body: <p>I have a dataframe as shown in the picture:</p>
  
  <p><a href="https://i.stack.imgur.com/9e5y4.png" rel="nofollow noreferrer">problem dataframe: attdf</a> </p>
  
  <p>I would like to group the data by Source class and Destination class, count the number of rows in each group and sum up Attention values.</p>
  
  <p>While trying to achieve that, I am unable to get past this type error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-100-6f2c8b3de8f2&gt; in &lt;module&gt;()
  ----&gt; 1 attdf.groupby(['Source Class', 'Destination Class']).count()
  
  8 frames
  pandas/_libs/properties.pyx in pandas._libs.properties.CachedProperty.__get__()
  
  /usr/local/lib/python3.6/dist-packages/pandas/core/algorithms.py in _factorize_array(values, na_sentinel, size_hint, na_value)
      458     table = hash_klass(size_hint or len(values))
      459     uniques, labels = table.factorize(values, na_sentinel=na_sentinel,
  --&gt; 460                                       na_value=na_value)
      461 
      462     labels = ensure_platform_int(labels)
  
  pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.factorize()
  
  pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable._unique()
  
  TypeError: unhashable type: 'numpy.ndarray'
  </code></pre>
  
  <pre><code>attdf.groupby(['Source Class', 'Destination Class'])
  
  </code></pre>
  
  <p>gives me a <code>&lt;pandas.core.groupby.generic.DataFrameGroupBy object at 0x7f1e720f2080&gt;</code> which I'm not sure how to use to get what I want.</p>
  
  <p>Dataframe attdf can be imported from : <a href="https://drive.google.com/open?id=1t_h4b8FQd9soVgYeiXQasY-EbnhfOEYi" rel="nofollow noreferrer">https://drive.google.com/open?id=1t_h4b8FQd9soVgYeiXQasY-EbnhfOEYi</a></p>
  
  <p>Please advise.</p>