HtmlTableParser.py 文件源码

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

项目:table-extractor 作者: dbpedia 项目源码 文件源码
def remove_html_encode_errors(self, headers, error):
        """
        Use this method to remove html special characters (Eg. &nbps), encoding errors or other unicode text.

        Simply pass headers rows to the method and the error, as a unicode string, you want to correct

        :param headers: rows list of headers
        :param error: unicode string you want to delete from header cells
        :return: nothing
        """
        # Iterates over headers
        for row in headers:
            # Iterate over header cells
            for header in row:
                # Replace 'error' with u'' in the text of this header cell
                header['th'] = header['th'].replace(error, u'')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号