title: 'DataFrame' objects are mutable, thus they cannot be hashed
body: <p>I'm trying to run the following code</p>
  
  <pre><code>def RSI(series, period):
   delta = series.diff().dropna()
   u = delta * 0
   d = u.copy()
   u[delta &gt; 0] = delta[delta &gt; 0]
   d[delta &lt; 0] = -delta[delta &lt; 0]
   u[u.index[period-1]] = np.mean( u[:period] ) #first value is sum of avg gains
   u = u.drop(u.index[:(period-1)])
   d[d.index[period-1]] = np.mean( d[:period] ) #first value is sum of avg losses
   d = d.drop(d.index[:(period-1)])
   rs = u.ewm(com=period-1, min_periods = period).mean() / \
   d.ewm(com=period-1, min_periods = period).mean()
   return 100 - 100 / (1 + rs)
  
      df['RSI'] = df.groupby(['Commodity'], as_index = False).apply(RSI(df, 14)).reset_index(level=0, drop = True)
  </code></pre>
  
  <p>I keep getting the following error:  "'DataFrame' objects are mutable, thus they cannot be hashed".</p>
  
  <p>However, when I use the following - it works:</p>
  
  <pre><code>df['RSI'] = RSI(df['Close'], 14)
  </code></pre>
  
  <p>What am I missing here?  I need to insert a Groupby to make this work correctly.</p>