-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrame.__repr__ raises TypeError after pd.show_versions() was run #13684
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
Comments
I cannot reproduce this using Windows and python 2.7. Could you try to debug this? To see where the error is coming from (seems there is something wrong with the |
Tracked it to this import of Indeed >>> import numpy as np
>>> np.max([42])
42
>>> reload(np)
<module 'numpy' from 'C:\Program Files\Python27\lib\site-packages\numpy\__init__.pyc'>
>>> np.max([42])
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
np.max([42])
File "C:\Program Files\Python27\lib\site-packages\numpy\core\fromnumeric.py", line 2293, in amax
out=out, **kwargs)
File "C:\Program Files\Python27\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
TypeError: an integer is required The line was changed in b4e2d34, so I guess that should fix this for the next version (though I am still curious if others have this |
I can't reproduce it using NumPy 1.10.4 and 1.11.1. Can you report it to NumPy? |
Seems to be a problem with the binaries here (does not occur with the PyPI wheels): I'll report to the packager, closing. |
The numpy issue: numpy/numpy#7844 |
@xflr6 Thanks for tracking it down! |
I think there is a real pandas bug here. The bug is that if modname in sys.modules:
mod = sys.modules[modname]
else:
mod = importlib.import_module(modname) |
@njsmith but seems numpy is not robust to being reloaded. |
@jreback I suspect a lot of modules are not robust against reloading. For instance if you define a class in @njsmith The reload property is documented in the |
ok this should be easy to fix then |
AFAICT, |
Maybe |
Or |
Pandas actually uses |
Maybe one of the imports in
show_versions
has unwanted side effects?The text was updated successfully, but these errors were encountered: