File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -486,11 +486,12 @@ def _repr_html_(self):
486
486
if get_option ("display.notebook_repr_html" ):
487
487
max_rows = get_option ("display.max_rows" )
488
488
max_cols = get_option ("display.max_columns" )
489
+ show_dimensions = get_option ("display.show_dimensions" )
489
490
490
491
return ('<div style="max-height:1000px;'
491
492
'max-width:1500px;overflow:auto;">\n ' +
492
493
self .to_html (max_rows = max_rows , max_cols = max_cols ,
493
- show_dimensions = True ) + '\n </div>' )
494
+ show_dimensions = show_dimensions ) + '\n </div>' )
494
495
else :
495
496
return None
496
497
Original file line number Diff line number Diff line change @@ -1428,6 +1428,13 @@ def test_repr_html(self):
1428
1428
1429
1429
fmt .reset_option ('^display.' )
1430
1430
1431
+ df = DataFrame ([[1 , 2 ], [3 , 4 ]])
1432
+ self .assertTrue ('2 rows' in df ._repr_html_ ())
1433
+ fmt .set_option ('display.show_dimensions' , False )
1434
+ self .assertFalse ('2 rows' in df ._repr_html_ ())
1435
+
1436
+ fmt .reset_option ('^display.' )
1437
+
1431
1438
def test_repr_html_wide (self ):
1432
1439
row = lambda l , k : [tm .rands (k ) for _ in range (l )]
1433
1440
max_cols = get_option ('display.max_columns' )
You can’t perform that action at this time.
0 commit comments