splitting pandas dataframe - np.array_split error · Issue #8846 · pandas-dev/pandas (original) (raw)

I just noticed that after upgrading to numpy 1.9.0, when I'm trying to split dataframe with pandas 0.15.1 with the code:

split_dfs = np.array_split(big_df,8)    

I get the error:

Traceback (most recent call last):
  File "./test.py", line 127, in <module>
    split_dfs = np.array_split(big_df,8)
  File "/usr/lib/python2.7/site-packages/numpy/lib/shape_base.py", line 426, in array_split
    if sub_arys[-1].size == 0 and sub_arys[-1].ndim != 1:
  File "/usr/lib/python2.7/site-packages/pandas-0.15.1-py2.7-linux-x86_64.egg/pandas   /core/generic.py", line 1936, in __getattr__
(type(self).__name__, name))
AttributeError: 'DataFrame' object has no attribute 'size'

with pandas 0.15.1 and numpy 1.8.1 it works fine.
I'm using pandas 0.15.1 on arch linux and python2.7