delete_data | AutoDataPrep in AutoML | teradataml - delete_data - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Package for Python
Release Number
20.00
Published
March 2025
ft:locale
en-US
ft:lastEdition
2026-01-07
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the delete_data() function to delete the deployed datasets from the database.

Required Parameter

table_name
Specifies the name of the table containing the deployed datasets.

Optional Parameter

fs_method
Specifies the name of the feature selection method to delete from the deployed datasets.

Permitted values: "lasso", "rfe", "pca".

Default value: None

If "fs_method" is None, then the function deletes all the deployed datasets.

Example setup

Create an instance of the AutoDataPrep.

Fit the data.

Deploy the data to the table.

Remove the deployed data from the table.

Example 1: Remove the deployed data from the table within the AutoDataPrep object

from teradataml import AutoDataPrep

Load the example data.

>>> load_example_data("teradataml", "titanic")
    >>> titanic = DataFrame.from_table("titanic")

Create an instance of AutoDataPrep.

>>> aprep_obj = AutoDataPrep(task_type="Classification", verbose=2)

Fit the data.

>>> aprep_obj.fit(titanic, titanic.survived)

Deploy the data to the database.

>>> aprep_obj.deploy("table_name")

Remove lasso deployed data from the table.

>>> aprep_obj.delete_data("table_name", fs_method="lasso")

Example 2: Remove the deployed data from the table using different instance of AutoDataPrep object

Create an instance of AutoDataPrep.

>>> aprep_obj2 = AutoDataPrep()

Remove lasso and pca deployed data from the table.

>>> aprep_obj2.delete_data("table_name", fs_method=["lasso", "pca"])