We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca61bec commit 2e29e11Copy full SHA for 2e29e11
pandas/core/frame.py
@@ -988,13 +988,15 @@ def __repr__(self) -> str:
988
"""
989
Return a string representation for a particular DataFrame.
990
991
+ buf = StringIO("")
992
if self._info_repr():
- buf = StringIO("")
993
self.info(buf=buf)
994
return buf.getvalue()
995
996
repr_params = fmt.get_dataframe_repr_params()
997
- return self.to_string(**repr_params)
+ self.to_string(buf=buf, **repr_params)
998
+
999
+ return buf.getvalue()
1000
1001
def _repr_html_(self) -> str | None:
1002
0 commit comments