Skip to content

Commit 40379b9

Browse files
committed
a few updates after code review
1 parent e7b0fd8 commit 40379b9

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

pandas/core/frame.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import types
2020
import warnings
2121
from textwrap import dedent
22-
from uuid import uuid1
2322

2423
import numpy as np
2524
import numpy.ma as ma
@@ -675,11 +674,9 @@ def _repr_html_(self):
675674
max_rows = get_option("display.max_rows")
676675
max_cols = get_option("display.max_columns")
677676
show_dimensions = get_option("display.show_dimensions")
678-
unique_id = str(uuid1())
679677

680678
return self.to_html(max_rows=max_rows, max_cols=max_cols,
681-
show_dimensions=show_dimensions, notebook=True,
682-
table_id=unique_id)
679+
show_dimensions=show_dimensions, notebook=True)
683680
else:
684681
return None
685682

pandas/io/formats/format.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,7 @@ def write_style(self):
12051205

12061206
def write_result(self, buf):
12071207
indent = 0
1208+
id_section = ""
12081209
frame = self.frame
12091210

12101211
_classes = ['dataframe'] # Default class.
@@ -1228,8 +1229,9 @@ def write_result(self, buf):
12281229
self.write('<div{style}>'.format(style=div_style))
12291230

12301231
self.write_style()
1231-
id_section = ' id="{table_id}"'.format(table_id=self.table_id)\
1232-
if self.table_id is not None else ""
1232+
1233+
if self.table_id is not None:
1234+
id_section = ' id="{table_id}"'.format(table_id=self.table_id)
12331235
self.write('<table border="{border}" class="{cls}"{id_section}>'
12341236
.format(border=self.border, cls=' '.join(_classes),
12351237
id_section=id_section), indent)

0 commit comments

Comments
 (0)