前提・実現したいこと
google colaboratoryを使用して、以下のモジュールをインストールしました。
https://github.com/vishaalagartha/basketball_reference_scraper/blob/master/API.md#get_rosterteam-season
このページの一番上のget_rosterを試したのですが、うまくいきませんでした。
発生している問題・エラーメッセージ
ImportError Traceback (most recent call last) <ipython-input-11-89420c948daf> in <module>() ----> 1 get_roster('DAL', 2019) 10 frames /usr/local/lib/python3.6/dist-packages/pandas/core/computation/expressions.py in <module>() 13 from pandas._config import get_option 14 ---> 15 from pandas._libs.lib import values_from_object 16 17 from pandas.core.dtypes.generic import ABCDataFrame ImportError: cannot import name 'values_from_object'
該当のソースコード
!pip install basketball-reference-scraper
python
1from basketball_reference_scraper.teams import get_roster, get_team_stats, get_opp_stats, get_roster_stats, get_team_misc 2get_roster('DAL', 2019)
###補足
!pip install basketball-reference-scraper
を行ったときに
ERROR: tensorflow 2.4.0 has requirement numpy~=1.19.2, but you'll have numpy 1.18.1 which is incompatible. ERROR: tensorflow 2.4.0 has requirement six~=1.15.0, but you'll have six 1.13.0 which is incompatible. ERROR: nbclient 0.5.1 has requirement jupyter-client>=6.1.5, but you'll have jupyter-client 5.3.5 which is incompatible. ERROR: google-colab 1.0.0 has requirement pandas~=1.1.0; python_version >= "3.0", but you'll have pandas 0.25.3 which is incompatible. ERROR: google-colab 1.0.0 has requirement requests~=2.23.0, but you'll have requests 2.22.0 which is incompatible. ERROR: google-colab 1.0.0 has requirement six~=1.15.0, but you'll have six 1.13.0 which is incompatible. ERROR: fbprophet 0.7.1 has requirement pandas>=1.0.4, but you'll have pandas 0.25.3 which is incompatible. ERROR: datascience 0.10.6 has requirement folium==0.2.1, but you'll have folium 0.8.3 which is incompatible. ERROR: albumentations 0.1.12 has requirement imgaug<0.2.7,>=0.2.5, but you'll have imgaug 0.2.9 which is incompatible. Installing collected packages: lxml, six, numpy, pytz, pandas, soupsieve, idna, requests, beautifulsoup4, basketball-reference-scraper Found existing installation: lxml 4.2.6 Uninstalling lxml-4.2.6: Successfully uninstalled lxml-4.2.6 Found existing installation: six 1.15.0 Uninstalling six-1.15.0: Successfully uninstalled six-1.15.0 Found existing installation: numpy 1.19.5 Uninstalling numpy-1.19.5: Successfully uninstalled numpy-1.19.5 Found existing installation: pytz 2018.9 Uninstalling pytz-2018.9: Successfully uninstalled pytz-2018.9 Found existing installation: pandas 1.1.5 Uninstalling pandas-1.1.5: Successfully uninstalled pandas-1.1.5 Found existing installation: idna 2.10 Uninstalling idna-2.10: Successfully uninstalled idna-2.10 Found existing installation: requests 2.23.0 Uninstalling requests-2.23.0: Successfully uninstalled requests-2.23.0 Found existing installation: beautifulsoup4 4.6.3 Uninstalling beautifulsoup4-4.6.3: Successfully uninstalled beautifulsoup4-4.6.3 Successfully installed basketball-reference-scraper-1.0.26 beautifulsoup4-4.8.2 idna-2.8 lxml-4.4.2 numpy-1.18.1 pandas-0.25.3 pytz-2019.3 requests-2.22.0 six-1.13.0 soupsieve-1.9.5 WARNING: The following packages were previously imported in this runtime: [numpy,pandas,pytz,six] You must restart the runtime in order to use newly installed versions.
というメッセージが表示されました。
回答1件
あなたの回答
tips
プレビュー