Teradata Package for Python Function Reference - from_table - 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.from_table = from_table(table_name, index=True, index_label=None) method of builtins.type instance
Class method for creating a DataFrame from a table or a view.
 
PARAMETERS:
    table_name:
        Required Argument.
        The table 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
        Column/s used for sorting.
        Types: str
 
EXAMPLES:
    from teradataml.dataframe.dataframe import DataFrame
    load_example_data("dataframe","sales")
    df = DataFrame.from_table('sales')
    df = DataFrame.from_table("sales", False)
    df = DataFrame.from_table("sales", True, "accounts")
 
RETURNS:
    DataFrame
 
RAISES:
    TeradataMlException - TDMLDF_CREATE_FAIL