How to Find the Versions for Your Pandas Version?
Published on Aug. 22, 2023, 12:12 p.m.
Pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool, built on top of the Python programming language.One can check pandas version by running pip commands either from the command line or by running a statement from a Python program.
1. Check pandas Version from Shell mode
From a command line or shell run the pip list command to check the pandas version or get the list of the package installed next to the package.
2. Check pandas version from programatically.
Sometimes you may need to know the pandas version programmatically at runtime in order to make a decision.
In order to import pandas and use pd.version attribute.
import pandas as pd
# Get pandas Version
print(pd.__version__)
Pandas depends on many external libraries (dependencies) itself.
To check the versions assumed by your current pandas version, run pd.show_versions() that returns a string representation.
Import the library with import panda as pd .
Run and print the function pd.show_versions() in your script.
Here’S the code:
import pandas as pd
print(pd.show_versions())
And output:
INSTALLED VERSIONS
------------------
commit : None
python : 3.7.2.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 11, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : de_DE.cp1252
pandas : 1.0.1
numpy : 1.19.2
pytz : 2018.9
dateutil : 2.8.0
pip : 20.0.2
setuptools : 40.6.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.4.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.10.1
IPython : None
pandas_datareader: 0.8.1
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.4.2
matplotlib : 3.0.2
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.2.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
xlsxwriter : None
numba : None