note.nkmk.me

Check pandas version: pd.show_versions

Posted: 2019-09-20 / Tags: Python, pandas

There are following ways to check the version of pandas used in the script.

  • Get version number: __version__ attribute
  • Print detailed information such as dependent packages: pd.show_versions()

See the following post for how to check the installed pandas version with pip command.

Sponsored Link

Get version number: __version__ attribute

Like many other packages, you can get the version number of pandas with the __version__ attribute.

import pandas as pd

print(pd.__version__)
# 0.22.0

pandas.show_versions() outputs detailed information including the versions of Python and dependent packages and OS type.

pd.show_versions()
# INSTALLED VERSIONS
# ------------------
# commit: None
# python: 3.6.5.final.0
# python-bits: 64
# OS: Darwin
# OS-release: 17.5.0
# machine: x86_64
# processor: i386
# byteorder: little
# LC_ALL: None
# LANG: ja_JP.UTF-8
# LOCALE: ja_JP.UTF-8
# pandas: 0.22.0
# pytest: None
# pip: 9.0.3
# setuptools: 39.0.1
# Cython: 0.26
# numpy: 1.14.1
# scipy: 0.18.1
# pyarrow: None
# xarray: None
# IPython: 6.1.0
# sphinx: None
# patsy: None
# dateutil: 2.6.1
# pytz: 2018.3
# blosc: None
# bottleneck: None
# tables: None
# numexpr: None
# feather: None
# matplotlib: 2.0.0
# openpyxl: 2.4.8
# xlrd: 1.0.0
# xlwt: None
# xlsxwriter: None
# lxml: 4.1.1
# bs4: 4.6.0
# html5lib: 0.9999999
# sqlalchemy: 1.1.10
# pymysql: None
# psycopg2: None
# jinja2: 2.9.6
# s3fs: None
# fastparquet: None
# pandas_gbq: None
# pandas_datareader: 0.6.0

When reporting bugs, it is required to describe the output of pandas.show_versions().

Sponsored Link
Share

Related Categories

Related Posts