db_python_package_version_diff() | Database Utilities | Teradata Package for Python - db_python_package_version_diff - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Package for Python
Release Number
20.00
Published
March 2025
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the db_python_package_version_diff() function to get the difference between the Python packages installed on Vantage and in the current environment for the packages mentioned in argument “packages”.

  • Use this function only when Python interpreter and add-on packages are installed on the Vantage node.
  • This function also checks for differences in Python packages versions given part of package name as a string.

Optional Argument

packages
Specifies the names of the Python packages for which the difference in the versions is to be fetched from Vantage.
  • If this argument is None, all the packages installed on Vantage are considered.
  • If any package is present in Vantage but not in the current environment, then None is shown as the version of the package in the current environment.

Types: str or list of str

Returns: pandas DataFrame

Example 1: Get the difference in the versions of Python package 'dill' installed on Vantage

>>> db_python_package_version_diff("dill")
     package   vantage  local
0       dill   0.10.0  0.11.2

Example 2: Get the difference in the versions of Python package 'dill' and 'matplotlib' installed on Vantage

>>> db_python_package_version_diff(["dill", "matplotlib"])
       package   vantage  local
0         dill   0.10.0  0.11.2
1    matplotlib   3.6.2   3.8.0

Example 3: Get the difference in the versions of all Python packages installed on Vantage

>>> db_python_package_version_diff()
         package  vantage  local
0   scikit-learn   1.3.3  0.24.2
1           dill  0.10.0  0.11.2
...
532        attrs  18.2.0  17.0.0

Example 4: Get the difference in the versions of all Python packages installed on Vantage that contain 'sci' in their name.

>>> db_python_package_version_diff("sci")
            package  vantage   local
0       scikit-learn   1.3.3  0.24.2
1    scikit-optimize   0.9.0    None
2        scikit-plot   0.3.7    None
3              scipy  1.10.0  1.15.1
4       scikit-image  0.19.3    None