model.py 文件源码

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

项目:NBA-prediction 作者: christopherjenness 项目源码 文件源码
def get_stats(self, url):
        """
        Extracts statistics from URL

        Args:
            url (str): basketball-reference.com box score

        Returns:
            stats (pd.DataFrame): DataFrame of statistics from game
        """
        response = urllib2.urlopen(url)
        html = response.read()
        stat_html = html.replace('<!--', "")
        stat_html = stat_html.replace('-->', "")
        stats = pd.read_html(stat_html)
        return stats[-5]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号