@@ -454,7 +454,7 @@ def __unicode__(self):
454
454
else :
455
455
width = None
456
456
self .to_string (buf = buf , max_rows = max_rows , max_cols = max_cols ,
457
- line_width = width )
457
+ line_width = width , show_dimensions = True )
458
458
459
459
return buf .getvalue ()
460
460
@@ -485,7 +485,8 @@ def _repr_html_(self):
485
485
486
486
return ('<div style="max-height:1000px;'
487
487
'max-width:1500px;overflow:auto;">\n ' +
488
- self .to_html (max_rows = max_rows , max_cols = max_cols ) \
488
+ self .to_html (max_rows = max_rows , max_cols = max_cols ,
489
+ show_dimensions = True ) \
489
490
+ '\n </div>' )
490
491
else :
491
492
return None
@@ -1254,7 +1255,8 @@ def to_string(self, buf=None, columns=None, col_space=None, colSpace=None,
1254
1255
header = True , index = True , na_rep = 'NaN' , formatters = None ,
1255
1256
float_format = None , sparsify = None , nanRep = None ,
1256
1257
index_names = True , justify = None , force_unicode = None ,
1257
- line_width = None , max_rows = None , max_cols = None ):
1258
+ line_width = None , max_rows = None , max_cols = None ,
1259
+ show_dimensions = False ):
1258
1260
"""
1259
1261
Render a DataFrame to a console-friendly tabular output.
1260
1262
"""
@@ -1281,7 +1283,8 @@ def to_string(self, buf=None, columns=None, col_space=None, colSpace=None,
1281
1283
index_names = index_names ,
1282
1284
header = header , index = index ,
1283
1285
line_width = line_width ,
1284
- max_rows = max_rows , max_cols = max_cols )
1286
+ max_rows = max_rows , max_cols = max_cols ,
1287
+ show_dimensions = show_dimensions )
1285
1288
formatter .to_string ()
1286
1289
1287
1290
if buf is None :
@@ -1293,7 +1296,8 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
1293
1296
header = True , index = True , na_rep = 'NaN' , formatters = None ,
1294
1297
float_format = None , sparsify = None , index_names = True ,
1295
1298
justify = None , force_unicode = None , bold_rows = True ,
1296
- classes = None , escape = True , max_rows = None , max_cols = None ):
1299
+ classes = None , escape = True , max_rows = None , max_cols = None ,
1300
+ show_dimensions = False ):
1297
1301
"""
1298
1302
Render a DataFrame as an HTML table.
1299
1303
@@ -1332,7 +1336,8 @@ def to_html(self, buf=None, columns=None, col_space=None, colSpace=None,
1332
1336
header = header , index = index ,
1333
1337
bold_rows = bold_rows ,
1334
1338
escape = escape ,
1335
- max_rows = max_rows , max_cols = max_cols )
1339
+ max_rows = max_rows , max_cols = max_cols ,
1340
+ show_dimensions = show_dimensions )
1336
1341
formatter .to_html (classes = classes )
1337
1342
1338
1343
if buf is None :
0 commit comments