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
Version: pandas 0.10.0 , via pip
OS: Ubuntu 12.04 x64
Description:
I put a user-defined object (which defines only getitem) into a dataframe. Printing the dataframe causes the system to hang. I suspect that the construction of a text representation of the object is calling my object's getitem.
A simple code snippet to fully reproduce the problem:
Desired behavior: pandas should not be calling the getitem method of objects in DataFrame.
Running this script causes my computer to hang. Ctrl+C dumps a long traceback. Here is the first bit of it:
Traceback (most recent call last):
File "test.py", line 6, in
print df
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 636, in str
return self.bytes()
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 646, in bytes
return self.unicode().encode(encoding , 'replace')
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 663, in unicode
self.to_string(buf=buf, line_width=line_width)
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 1503, in to_string
formatter.to_string()
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/format.py", line 297, in to_string
strcols = self._to_str_columns()
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/format.py", line 251, in _to_str_columns
fmt_values = self._format_col(i)
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/format.py", line 379, in _format_col
space=self.col_space)
The text was updated successfully, but these errors were encountered:
Version: pandas 0.10.0 , via
pip
OS: Ubuntu 12.04 x64
Description:
I put a user-defined object (which defines only getitem) into a dataframe. Printing the dataframe causes the system to hang. I suspect that the construction of a text representation of the object is calling my object's getitem.
A simple code snippet to fully reproduce the problem:
Desired behavior: pandas should not be calling the getitem method of objects in DataFrame.
Running this script causes my computer to hang. Ctrl+C dumps a long traceback. Here is the first bit of it:
Traceback (most recent call last):
File "test.py", line 6, in
print df
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 636, in str
return self.bytes()
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 646, in bytes
return self.unicode().encode(encoding , 'replace')
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 663, in unicode
self.to_string(buf=buf, line_width=line_width)
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 1503, in to_string
formatter.to_string()
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/format.py", line 297, in to_string
strcols = self._to_str_columns()
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/format.py", line 251, in _to_str_columns
fmt_values = self._format_col(i)
File "/home/jack/.local/lib/python2.7/site-packages/pandas/core/format.py", line 379, in _format_col
space=self.col_space)
The text was updated successfully, but these errors were encountered: