當(dāng)我在 databricks 上運(yùn)行 python3.7 代碼時,我試圖解決 pandas 的問題。錯誤是: ImportError: cannot import name 'roperator' from 'pandas.core.ops' (/databricks/python/lib/python3.7/site-packages/pandas/core/ops.py)熊貓版本:pd.__version__0.24.2我跑 from pandas.core.ops import roperator在我的筆記本電腦上很好用pandas 0.25.1所以,我嘗試在databricks上升級pandas。%sh pip uninstall -y pandasSuccessfully uninstalled pandas-1.1.2%sh pip install pandas==0.25.1 Collecting pandas==0.25.1 Downloading pandas-0.25.1-cp37-cp37m-manylinux1_x86_64.whl (10.4 MB) Requirement already satisfied: python-dateutil>=2.6.1 in /databricks/conda/envs/databricks-ml/lib/python3.7/site-packages (from pandas==0.25.1) (2.8.0) Requirement already satisfied: numpy>=1.13.3 in /databricks/conda/envs/databricks-ml/lib/python3.7/site-packages (from pandas==0.25.1) (1.16.2) Requirement already satisfied: pytz>=2017.2 in /databricks/conda/envs/databricks-ml/lib/python3.7/site-packages (from pandas==0.25.1) (2018.9) Requirement already satisfied: six>=1.5 in /databricks/conda/envs/databricks-ml/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas==0.25.1) (1.12.0) Installing collected packages: pandas ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts. We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.當(dāng)我跑步時: import pandas as pd pd.__version__它還是: 0.24.2我錯過了什么嗎?
在 databricks 上安裝新版本后 pandas 版本未更新
HUH函數(shù)
2023-07-27 17:51:48