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

DataFrame repr regression #3387

Closed
cpcloud opened this issue Apr 17, 2013 · 2 comments
Closed

DataFrame repr regression #3387

cpcloud opened this issue Apr 17, 2013 · 2 comments
Labels
Bug Output-Formatting __repr__ of pandas objects, to_string Regression Functionality that used to work in a prior pandas version
Milestone

Comments

@cpcloud
Copy link
Member

cpcloud commented Apr 17, 2013

There's a call to to_string in DataFrame._repr_fits_horizontal that is drastically slowing down repring of large DataFrames and incidentally makes the option max_info_rows useless since that call occurs before max_info_rows comes into play.

Is there any way to compute the length of the column repr without using the entire frame as a string? Also, for large frames that will create tons of temporary strings that could cause a segfault if one doesn't have swap enabled (that's probably a bit alarmist; I'm trying to be thorough here. :)) At best it will raise a MemoryError exception.

What's the thinking here? One could check max_info_rows in DataFrame._repr_fits_horizontal, but that's more of a stopgap solution than an actual one. Using cStringIO is not a viable solution: it only gives a ~29 ms speedup. Also, should there be a vbench for repring?

@hayd
Copy link
Contributor

hayd commented Apr 18, 2013

cc #3337.

@ghost ghost assigned lodagro Apr 18, 2013
@ghost
Copy link

ghost commented Apr 22, 2013

fixed by b9fa04a

@ghost ghost closed this as completed Apr 22, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Output-Formatting __repr__ of pandas objects, to_string Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

No branches or pull requests

3 participants