Skip to content

Commit

Permalink
Revert "CLN: DataFrame.__repr__ (#44271)" (#44286)
Browse files Browse the repository at this point in the history
This reverts commit 015541e.
  • Loading branch information
simonjayhawkins authored Nov 2, 2021
1 parent ca61bec commit 2e29e11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,13 +988,15 @@ def __repr__(self) -> str:
"""
Return a string representation for a particular DataFrame.
"""
buf = StringIO("")
if self._info_repr():
buf = StringIO("")
self.info(buf=buf)
return buf.getvalue()

repr_params = fmt.get_dataframe_repr_params()
return self.to_string(**repr_params)
self.to_string(buf=buf, **repr_params)

return buf.getvalue()

def _repr_html_(self) -> str | None:
"""
Expand Down

0 comments on commit 2e29e11

Please sign in to comment.