Teradata Package for Python Function Reference - __init__ - 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.00
Published
November 2021
Language
English (United States)
Last Update
2021-11-19
lifecycle
previous
Product Category
Teradata Vantage
teradataml.dataframe.dataframe.DataFrame.__init__ = __init__(self, table_name=None, index=True, index_label=None, query=None, materialize=False)
Constructor for TerdataML DataFrame.
 
PARAMETERS:
    table_name:
        Optional Argument.
        The table name or view name in Teradata Vantage referenced by this DataFrame.
        Types: str
 
    index:
        Optional Argument.
        True if using index column for sorting, otherwise False.
        Default Value: True
        Types: bool
 
    index_label:
        Optional Argument.
        Column/s used for sorting.
        Types: str OR list of Strings (str)
 
    query:
        Optional Argument.
        SQL query for this Dataframe. Used by class method from_query.
        Types: str
 
    materialize:
        Optional Argument.
        Whether to materialize DataFrame or not when created.
        Used by class method from_query.
 
        One should use enable materialization, when the query  passed to from_query(),
        is expected to produce non-deterministic results, when it is executed multiple
        times. Using this option will help user to have deterministic results in the
        resulting teradataml DataFrame.
        Default Value: False (No materialization)
        Types: bool
 
EXAMPLES:
    from teradataml.dataframe.dataframe import DataFrame
    df = DataFrame("mytab")
    df = DataFrame("myview")
    df = DataFrame("myview", False)
    df = DataFrame("mytab", True, "Col1, Col2")
 
RAISES:
    TeradataMlException - TDMLDF_CREATE_FAIL