File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -612,9 +612,11 @@ def _repr_html_(self):
612
612
max_rows = get_option ("display.max_rows" )
613
613
max_cols = get_option ("display.max_columns" )
614
614
show_dimensions = get_option ("display.show_dimensions" )
615
+ classes = ['pandas_notebook' ]
615
616
616
617
return self .to_html (max_rows = max_rows , max_cols = max_cols ,
617
- show_dimensions = show_dimensions , notebook = True )
618
+ show_dimensions = show_dimensions , notebook = True ,
619
+ classes = classes )
618
620
else :
619
621
return None
620
622
Original file line number Diff line number Diff line change @@ -1183,6 +1183,8 @@ def _column_header():
1183
1183
1184
1184
if isinstance (self .columns , MultiIndex ):
1185
1185
template = 'colspan="%d" halign="left"'
1186
+ if 'pandas_notebook' in self .classes :
1187
+ template += ' class="pandas_notebook"'
1186
1188
1187
1189
if self .fmt .sparsify :
1188
1190
# GH3547
@@ -1252,6 +1254,8 @@ def _column_header():
1252
1254
if records [i ] > 1 :
1253
1255
tags [j ] = template % records [i ]
1254
1256
else :
1257
+ if 'pandas_notebook' in self .classes :
1258
+ tags [j ] = 'class="pandas_notebook"'
1255
1259
continue
1256
1260
j += 1
1257
1261
row .append (v )
You can’t perform that action at this time.
0 commit comments