DataFrame repr regression #3387
Labels
Bug
Output-Formatting
__repr__ of pandas objects, to_string
Regression
Functionality that used to work in a prior pandas version
Milestone
There's a call to
to_string
inDataFrame._repr_fits_horizontal
that is drastically slowing downrepr
ing of largeDataFrame
s and incidentally makes the optionmax_info_rows
useless since that call occurs beforemax_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 aMemoryError
exception.What's the thinking here? One could check
max_info_rows
inDataFrame._repr_fits_horizontal
, but that's more of a stopgap solution than an actual one. UsingcStringIO
is not a viable solution: it only gives a ~29 ms speedup. Also, should there be a vbench forrepr
ing?The text was updated successfully, but these errors were encountered: