找到 Pandas 和其依賴項在 Python 中的版本


Pandas 是用於 Python 中的資料分析的重要軟體包。Pandas 有不同的版本可用。由於某些版本不匹配,它可能會產生一些問題。因此我們需要找到 Pandas 的版本號。我們可以使用以下程式碼輕鬆檢視它們。

我們可以使用類似下面的命令來獲取版本−

pandas.__version__

示例

>>> import pandas as pd
>>> print(pd.__version__)
0.25.2
>>>

我們還可以使用類似於以下的函式獲取依賴項的版本−

pandas.show_versions()
>>> pd.show_versions()
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.1.final.0
python-bits : 64
OS : Windows
OS-release : 7
machine : AMD64
processor : Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None

pandas : 0.25.2
numpy : 1.15.3
pytz : 2018.7
dateutil : 2.7.4
pip : 19.2.2
setuptools : 39.0.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.2.5
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : 4.6.3
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.2.5
matplotlib : 3.0.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
>>>

更新於:2019 年 11 月 4 日

170 次檢視

開啟你的 事業

完成課程即可獲得認證

開始
廣告
© . All rights reserved.