stats.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:tableintuit 作者: Metatab 项目源码 文件源码
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'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号