Skip to content

Error dividing Dataframe by Series but only when size is large enough #27853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
deto opened this issue Aug 10, 2019 · 2 comments
Closed

Error dividing Dataframe by Series but only when size is large enough #27853

deto opened this issue Aug 10, 2019 · 2 comments
Labels
Duplicate Report Duplicate issue or pull request

Comments

@deto
Copy link

deto commented Aug 10, 2019

Code Sample

# This works fine
a = pd.DataFrame(np.random.randn(9999, 10))
b = a.divide(a.sum(axis=0), axis=1)

# This doesn't
a = pd.DataFrame(np.random.randn(10001, 10))
b = a.divide(a.sum(axis=0), axis=1)

# │AttributeError: 'numpy.dtype' object has no attribute 'value_counts'

Problem description

Should be able to divide the dataframe by the series and align on the axis.

This works for smaller dataframes but breaks suddenly for larger ones. Doesn't happen for me on 0.24.0 but occurs on 0.25.0

Output of pd.show_versions()

INSTALLED VERSIONS

commit : None
python : 3.6.8.final.0
python-bits : 64
OS : Linux
OS-release : 4.13.0-45-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 0.25.0
numpy : 1.16.4
pytz : 2019.1
dateutil : 2.8.0
pip : 19.1.1
setuptools : 41.0.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : 0.4.0
xlsxwriter : 1.1.2
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.1
IPython : 7.6.1
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : 3.1.0
numexpr : 2.6.9
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.12.1
pytables : None
s3fs : None
scipy : 1.2.1
sqlalchemy : None
tables : 3.5.2
xarray : None
xlrd : 1.1.0
xlwt : None
xlsxwriter : 1.1.2

@jbrockmendel
Copy link
Member

I think this is a duplicate of #27636, should be fixed by #27773.

@TomAugspurger
Copy link
Contributor

Closing as a duplicate.

@TomAugspurger TomAugspurger added the Duplicate Report Duplicate issue or pull request label Aug 19, 2019
@TomAugspurger TomAugspurger added this to the No action milestone Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

3 participants