normalizer.py 文件源码

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

项目:the-magical-csv-merge-machine 作者: entrepreneur-interet-general 项目源码 文件源码
def read_excel(self, file):
        # TODO: add iterator and return columns
        excel_tab = pd.read_excel(file, dtype=str)
        columns = excel_tab.columns

        def make_gen(excel_tab, chunksize):
            cursor = 0
            chunk = excel_tab.iloc[:chunksize]
            while chunk.shape[0]:
                yield chunk
                cursor += chunksize
                chunk = excel_tab.iloc[cursor:cursor+chunksize]
        tab = make_gen(excel_tab, self.CHUNKSIZE) 

        tab = (self._clean_header(tab_part) for tab_part in tab)

        return tab, None, None, self._clean_column_names(columns)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号