python - 如何找到已安装的 pandas 版本

我在使用 pandas 的某些功能时遇到了问题。如何查看我的安装版本?

最佳答案

检查pandas.__version__:

In [76]: import pandas as pd

In [77]: pd.__version__
Out[77]: '0.12.0-933-g281dc4e'

Pandas 还提供了一个实用函数 pd.show_versions(),它也会报告其依赖项的版本:

In [53]: pd.show_versions(as_json=False)

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-45-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.15.2-113-g5531341
nose: 1.3.1
Cython: 0.21.1
numpy: 1.8.2
scipy: 0.14.0.dev-371b4ff
statsmodels: 0.6.0.dev-a738b4f
IPython: 2.0.0-dev
sphinx: 1.2.2
patsy: 0.3.0
dateutil: 1.5
pytz: 2012c
bottleneck: None
tables: 3.1.1
numexpr: 2.2.2
matplotlib: 1.4.2
openpyxl: None
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: None
lxml: 3.3.3
bs4: 4.3.2
html5lib: 0.999
httplib2: 0.8
apiclient: None
rpy2: 2.5.5
sqlalchemy: 0.9.8
pymysql: None
psycopg2: 2.4.5 (dt dec mx pq3 ext)

https://stackoverflow.com/questions/20612645/

相关文章:

python - python多久刷新一次文件?

python - 将 Django 模型对象转换为 dict 并且所有字段都完好无损

shell - 从文件中读取随机行的简单方法是什么?

linux - 使用端口 80 (Ubuntu/Linode) 运行 Node.js 时的最佳实践

python - 有哪些好的 Python ORM 解决方案?

python - 在python中获取随机 bool 值?

python - 检查字符串是否以列表中的一个字符串结尾

linux - Linux 内核是如何测试的?

linux - 如何找出文本文件中的行尾?

linux - 如何使用 'cut' 查找最后一个字段