You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
This is due to a change in numpy: numpy/numpy#4102 (.size is used to check if a FutureWarning should be raised or not, introduced in numpy 1.9.0).
But, this is a numpy function, and not really guaranteed to work with pandas dataframes although it did before (or should numpy do an asarray? @jreback , or should DataFrame have a size attribute?)
For a pandas-native split functionality, see the enhancement request: #7387
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:
I get the error:
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
The text was updated successfully, but these errors were encountered: