df_summary.py 文件源码

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

项目:Eskapade 作者: KaveIO 项目源码 文件源码
def process_nan_histogram(self, nphist, n_data):
        """Process nans histogram

        Add nans histogram to pdf list

        :param nphist: numpy-style input histogram, consisting of comma-separaged bin_entries, bin_edges
        :param int n_data: number of entries in the processed data set
        """

        var_label = 'NaN count'
        x_label = 'Column name'
        y_label = self.hist_y_label if self.hist_y_label else None
        hist_file_name = 'hist_NaNs.pdf'
        pdf_file_name = '{0:s}/{1:s}'.format(self.results_path, hist_file_name)
        visualization.vis_utils.plot_histogram(nphist, x_label=x_label, y_label=y_label, is_num=False, is_ts=False,
                                               pdf_file_name=pdf_file_name)
        table = [('count', '{:d}'.format(n_data))]
        stats_table = tabulate.tabulate(table, tablefmt='latex')
        self.pages.append(self.page_template.replace('VAR_LABEL', var_label).replace('VAR_STATS_TABLE', stats_table)
                          .replace('VAR_HISTOGRAM_PATH', hist_file_name))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号