Teradata Package for Python Function Reference on VantageCloud Lake - materialize - 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.08
- Published
- November 2025
- ft:locale
- en-US
- ft:lastEdition
- 2025-12-05
- dita:id
- TeradataPython_FxRef_Lake_2000
- Product Category
- Teradata Vantage
- teradataml.dataframe.dataframe.DataFrame.materialize = materialize(self)
- DESCRIPTION:
Method to materialize teradataml DataFrame into a database object.
Notes:
* DataFrames are materialized in either view/table/volatile table,
which is decided and taken care by teradataml.
* If user wants to materialize object into specific database object
such as table/volatile table, use 'to_sql()' or 'copy_to_sql()' or
'fastload()' functions.
* Materialized object is garbage collected at the end of the session.
PARAMETERS:
None
RETURNS:
DataFrame
EXAMPLES:
>>> load_example_data("dataframe", "admissions_train")
>>> df = DataFrame("admissions_train")
>>> df
masters gpa stats programming admitted
id
13 no 4.00 Advanced Novice 1
26 yes 3.57 Advanced Advanced 1
5 no 3.44 Novice Novice 0
19 yes 1.98 Advanced Advanced 0
15 yes 4.00 Advanced Advanced 1
40 yes 3.95 Novice Beginner 0
7 yes 2.33 Novice Novice 1
22 yes 3.46 Novice Beginner 0
36 no 3.00 Advanced Novice 0
38 yes 2.65 Advanced Beginner 1
# Example 1: Perform operations on teradataml DataFrame
# and materializeit in a database object.
>>> df2 = df.get([["id", "masters", "gpa"]])
# Initially table_name will be None.
>>> df2._table_name
>>> df2.materialize()
masters gpa
id
15 yes 4.00
7 yes 2.33
22 yes 3.46
17 no 3.83
13 no 4.00
38 yes 2.65
26 yes 3.57
5 no 3.44
34 yes 3.85
40 yes 3.95
# After materialize(), view name will be assigned.
>>> df2._table_name
'"ALICE"."ml__select__172077355985236"'
>>>