Teradata Package for Python Function Reference on VantageCloud Lake - delete_data - 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.automl.autodataprep.AutoDataPrep.delete_data = delete_data(self, table_name, fs_method=None)
DESCRIPTION:
    Deletes the deployed datasets from the database.
 
PARAMETERS:
    table_name:
        Required Argument.
        Specifies the name of the table containing the deployed datasets.
        Types: str
    
    fs_method:
        Optional Argument.
        Specifies the name of the feature selection method to delete from the
        deployed datasets.
        Default Value: None
        Permitted Values: "lasso", "rfe", "pca"
        Note:
            * If "fs_method" is None, then method deletes all the deployed datasets.
        Types: str or list of str
 
RETURNS:
    None
 
RAISES:
    TeradataMlException
 
EXAMPLES:
    # 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 datas 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"])