Teradata Package for Python Function Reference on VantageCloud Lake - create_temp_view - 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 on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
20.00.00.11
Publication Date
August 2026
Content Type
Programming Reference
Publication ID
B700-4500-200K
ft:locale
en-US
ft:lastEdition
2026-08-13
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.dataframe.dataframe.DataFrame.create_temp_view = create_temp_view(self, name)
DESCRIPTION:
    Creates a temporary view for session on the DataFrame.
 
PARAMETERS:
    name:
        Required Argument.
        Specifies the name of the temporary view.
        Type: str
 
RETURNS:
    None
 
RAISES:
    OperationalError (When view already exists).
 
EXAMPLES:
    # Load the data to run the example.
    >>> load_example_data("dataframe", "admissions_train")
    >>> df = DataFrame("admissions_train")
    >>> df
        masters   gpa     stats programming  admitted
    id
    38     yes  2.65  Advanced    Beginner         1
    7      yes  2.33    Novice      Novice         1
    26     yes  3.57  Advanced    Advanced         1
    17      no  3.83  Advanced    Advanced         1
    34     yes  3.85  Advanced    Beginner         0
    13      no  4.00  Advanced      Novice         1
    32     yes  3.46  Advanced    Beginner         0
    11      no  3.13  Advanced    Advanced         1
    15     yes  4.00  Advanced    Advanced         1
    36      no  3.00  Advanced      Novice         0
 
    # Example 1: Create view 'new_admissions'.
    >>> df.create_temp_view("new_admissions")
    >>> new_df = DataFrame("new_admissions")
    >>> new_df
        masters   gpa     stats programming  admitted
    id
    38     yes  2.65  Advanced    Beginner         1
    7      yes  2.33    Novice      Novice         1
    26     yes  3.57  Advanced    Advanced         1
    17      no  3.83  Advanced    Advanced         1
    34     yes  3.85  Advanced    Beginner         0
    13      no  4.00  Advanced      Novice         1
    32     yes  3.46  Advanced    Beginner         0
    11      no  3.13  Advanced    Advanced         1
    15     yes  4.00  Advanced    Advanced         1
    36      no  3.00  Advanced      Novice         0