Teradata Package for Python Function Reference | 17.10 - numeric_columns - 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.10
Published
April 2022
Language
English (United States)
Last Update
2022-08-19
lifecycle
previous
Product Category
Teradata Vantage
teradataml.common.formula.Formula.numeric_columns
DESCRIPTION:
    Property to get the list of all independent numerical columns used in formula.
 
PARAMETERS:
    None.
 
RETURNS:
    List of numerical columns used in formula.
    If no numerical column is used in formula, property will return None.
 
RAISES:
    None.
 
EXAMPLES:
    # Load the data to run the example
    load_example_data("decisionforest", ["housing_train"])
 
    # Create teradataml DataFrame.
    housing_train = DataFrame.from_table("housing_train")
 
    # Example 1 -
    decision_forest_out1 = DecisionForest(formula = "homestyle ~ bedrooms + lotsize + gashw + driveway + stories + recroom + price + garagepl + bathrms + fullbase + airco + prefarea",
                                          data = housing_train,
                                          tree_type = "classification",
                                          ntree = 50,
                                          nodesize = 1,
                                          variance = 0.0,
                                          max_depth = 12,
                                          mtry = 3,
                                          mtry_seed = 100,
                                          seed = 100)
 
    # Print numeric columns used in formula.
    decision_forest_out1.formula.numeric_columns