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):
486486 if get_option ("display.notebook_repr_html" ):
487487 max_rows = get_option ("display.max_rows" )
488488 max_cols = get_option ("display.max_columns" )
489+ show_dimensions = get_option ("display.show_dimensions" )
489490
490491 return ('<div style="max-height:1000px;'
491492 'max-width:1500px;overflow:auto;">\n ' +
492493 self .to_html (max_rows = max_rows , max_cols = max_cols ,
493- show_dimensions = True ) + '\n </div>' )
494+ show_dimensions = show_dimensions ) + '\n </div>' )
494495 else :
495496 return None
496497
Original file line number Diff line number Diff line change @@ -1428,6 +1428,13 @@ def test_repr_html(self):
14281428
14291429 fmt .reset_option ('^display.' )
14301430
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+
14311438 def test_repr_html_wide (self ):
14321439 row = lambda l , k : [tm .rands (k ) for _ in range (l )]
14331440 max_cols = get_option ('display.max_columns' )
You can’t perform that action at this time.
0 commit comments