Skip to content

Commit 4a3911a

Browse files
committed
Improve variable naming
1 parent 9c3df8a commit 4a3911a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pandas/core/groupby/groupby.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -544,15 +544,15 @@ def __repr__(self) -> str:
544544
return object.__repr__(self)
545545

546546
def _repr_html_(self) -> str:
547-
html_text = ""
548-
for idx, df_group in self:
549-
if not hasattr(df_group, "to_html"):
550-
df_group = df_group.to_frame()
551-
html_text += f"<H3>Group Key: {idx}<H3/>"
552-
html_text += df_group.to_html(
547+
repr_html = ""
548+
for group_name, group in self:
549+
if not hasattr(group, "to_html"):
550+
group = group.to_frame()
551+
repr_html += f"<H3>Group Key: {group_name}<H3/>"
552+
repr_html += group.to_html(
553553
max_rows=get_option("display.max_rows") // self.ngroups
554554
)
555-
return html_text
555+
return repr_html
556556

557557
def _assure_grouper(self):
558558
"""

0 commit comments

Comments
 (0)