def __str__(self):
from tabulate import tabulate
rows = []
for name, stats in iteritems(self._stats):
stats_dict = stats.dict
del stats_dict['uvalues']
#stats_dict['hist'] = text_hist(stats_dict['hist'], True)
if not rows:
rows.append(list(stats_dict.keys()))
rows.append(list(stats_dict.values()))
if rows:
table = tabulate(rows[1:], rows[0], tablefmt='pipe')
return 'Statistics \n' + table
else:
return 'Statistics: None \n'
评论列表
文章目录