From this discussion: https://groups.google.com/d/msg/pydata/AExc0ITFm94/Q5k5hcwZQFMJ
It appears that groupby object cannot be unpickled. The following code reproduces the problem for me:
import pandas as pd
import pickle
df = pd.DataFrame([[1,2,3], [4,5,6], [7,8,9]])
gr = df.groupby(0)
b = pickle.dumps(gr)
gr2 = pickle.loads(b) # Fails with RuntimeError
<snip 50 repeat lines...>
File "C:\Miniconda3\lib\site-packages\pandas\core\groupby.py", line 482, in __getattr__
if attr in self.obj:
File "C:\Miniconda3\lib\site-packages\pandas\core\groupby.py", line 482, in __getattr__
if attr in self.obj:
RuntimeError: maximum recursion depth exceeded while calling a Python object
Comment From: TomAugspurger
This seems to work now.
Would take a test, but closing for now.