Skip to content

Commit 4aa2b8c

Browse files
committed
small cleanups
1 parent de01518 commit 4aa2b8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/frame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ def __repr__(self) -> str:
990990
Return a string representation for a particular DataFrame.
991991
"""
992992
if self._info_repr():
993-
buf = StringIO("")
993+
buf = StringIO()
994994
self.info(buf=buf)
995995
return buf.getvalue()
996996

@@ -1004,7 +1004,7 @@ def _repr_html_(self) -> str | None:
10041004
Mainly for IPython notebook.
10051005
"""
10061006
if self._info_repr():
1007-
buf = StringIO("")
1007+
buf = StringIO()
10081008
self.info(buf=buf)
10091009
# need to escape the <class>, should be the first line.
10101010
val = buf.getvalue().replace("<", r"&lt;", 1)

0 commit comments

Comments
 (0)