title: level name b is not the name of the index
body: <p>I am trying to use a groupby on a dataframe as described here: <a href="https://stackoverflow.com/questions/33907537/groupby-and-lag-all-columns-of-a-dataframe">Groupby and lag all columns of a dataframe?</a></p>
  
  <p>For that I created this piece of code:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  
  data=range(1,101)
  df=pd.DataFrame(data=data)
  df.columns=["a"]
  df["b"]=np.round( df["a"] / 5)
  print(df)
  shifted = df.groupby(level="b").shift(-1)
  df=df.join(shifted)
  print(df)
  </code></pre>
  
  <p>Unfortunatly this throws a "ValueError: level name b is not the name of the index" error and I cannot seem to figure out why. Printing the df shows that it has only a single level of indexes with "b" being in it. </p>
  
  <p>Anyone know how to get this to work?</p>
  
  <p>PS: I am trying to get a shift on certain columns but on group level.</p>