deputies_dataset.py 文件源码

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

项目:serenata-toolbox 作者: datasciencebr 项目源码 文件源码
def fetch(self):
        """
        Fetches the list of deputies for the current term.
        """
        xml = urllib.request.urlopen(self.URL)

        tree = ET.ElementTree(file=xml)
        records = self._parse_deputies(tree.getroot())

        df = pd.DataFrame(records, columns=(
            'congressperson_id',
            'budget_id',
            'condition',
            'congressperson_document',
            'civil_name',
            'congressperson_name',
            'picture_url',
            'gender',
            'state',
            'party',
            'phone_number',
            'email'
        ))
        return self._translate(df)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号