Teradata Package for Python Function Reference | 17.10 - db_python_package_details - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference

Product
Teradata Package for Python
Release Number
17.10
Published
April 2022
Language
English (United States)
Last Update
2022-08-19
lifecycle
previous
Product Category
Teradata Vantage
teradataml.dbutils.db_python_package_details = db_python_package_details(names=None)
DESCRIPTION:
    Function to get the Python packages, installed on Vantage, and their corresponding
    versions.
    Note:
        Using this function is valid only when Python interpreter and add-on packages
        are installed on the Vantage node.
 
PARAMETERS:
    names:
        Optional Argument.
        Specifies the name(s)/pattern(s) of the Python package(s) for which version
        information is to be fetched from Vantage. If this argument is not specified
        or None, versions of all installed Python packages are returned.
        Default Value: None
        Types: str
 
RETURNS:
    teradataml DataFrame, if package(s) is/are present in the Vantage.
 
RAISES:
    TeradataMlException.
 
EXAMPLES:
    # Note:
    #   These examples will work only when the Python packages are installed on Vantage.
 
    # Example 1: Get the details of a Python package 'dill' from Vantage.
    >>> db_python_package_details("dill")
      package  version
    0    dill  0.2.8.2
 
    # Example 2: Get the details of Python packages, having string 'mpy', installed on Vantage.
    >>> db_python_package_details(names = "mpy")
             package  version
    0          simpy   3.0.11
    1          numpy   1.16.1
    2          gmpy2    2.0.8
    3  msgpack-numpy  0.4.3.2
    4          sympy      1.3
 
    # Example 3: Get the details of Python packages, having string 'numpy' and 'learn',
    #            installed on Vantage.
    >>> db_python_package_details(["numpy", "learn"])
             package  version
    0   scikit-learn   0.20.3
    1          numpy   1.16.1
    2  msgpack-numpy  0.4.3.2
 
    # Example 4: Get the details of all Python packages installed on Vantage.
    >>> db_python_package_details()
              package  version
    0       packaging     18.0
    1          cycler   0.10.0
    2           simpy   3.0.11
    3  more-itertools    4.3.0
    4          mpmath    1.0.0
    5           toolz    0.9.0
    6       wordcloud    1.5.0
    7         mistune    0.8.4
    8  singledispatch  3.4.0.3
    9           attrs   18.2.0