Skip to content
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

Overflow encountered in long_scalars #961

Open
smcolby opened this issue Oct 4, 2022 · 2 comments
Open

Overflow encountered in long_scalars #961

smcolby opened this issue Oct 4, 2022 · 2 comments

Comments

@smcolby
Copy link

smcolby commented Oct 4, 2022

When using pandas' to_hdf method with tables flag (to signal use of pytables) on Windows (no issue with Linux or Mac), the following warning is presented:

tables\leaf.py:318: RuntimeWarning: overflow encountered in long_scalars
  expected_mb = (expectedrows * rowsize) // MB

However, after reading the resulting file back into memory, the two data frames are identical in content.

This issue was raised on pandas' repository, but they closed indicating it should be addressed here.

@avalentino
Copy link
Member

Dear @smcolby
thanks for reporting.
It would be nice to have a small and self-contained example to reproduce the issue

@smcolby
Copy link
Author

smcolby commented Oct 26, 2022

Apologies for the delay! The below will produce the error on Windows.

import numpy as np
import pandas as pd

pd.DataFrame(np.empty((100000000, 7))).to_hdf('test.h5', 'test', format='table', complib='blosc', complevel=5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants