Teradata Python Package Function Reference - CCMPrepare - Teradata Python Package - Look here for syntax, methods and examples for the functions included in the Teradata Python Package.

Teradata® Python Package Function Reference

Product
Teradata Python Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2020-07-17
lifecycle
previous
Product Category
Teradata Vantage

 
teradataml.analytics.mle.CCMPrepare = class CCMPrepare(builtins.object)
     Methods defined here:
__init__(self, data=None, data_partition_column='1', data_order_column=None)
DESCRIPTION:
    The CCMPrepare function prepares an input teradataml DataFrame for
    the CCM function by adding a partition column, ccm id, and
    partitioning the data. Using the CCMPrepare function is optional.
    However, partitioning the data, instead of having all sequences on
    one vworker, may increase the speed of the CCM function for large
    data sets consisting of multiple sequences.
 
 
PARAMETERS:
    data:
        Required Argument.
        Specifies the teradataml DataFrame containing the input data.
 
    data_partition_column:
        Optional Argument.
        Specifies the Partition By columns for "data".
        Values to this argument can be provided as list, if multiple
        columns are used for partition.
        Default Value: 1
        Types: str OR list of Strings (str)
 
    data_order_column:
        Optional Argument.
        Specifies Order By columns for data.
        Values to this argument can be provided as a list, if multiple
        columns are used for ordering.
        Types: str OR list of Strings (str)
 
RETURNS:
    Instance of CCMPrepare.
    Output teradataml DataFrames can be accessed using attribute
    references, such as CCMPrepareObj.<attribute_name>.
    Output teradataml DataFrame attribute name is:
        result
 
 
RAISES:
    TeradataMlException
 
 
EXAMPLES:
    # Load example data.
    load_example_data("ccmprepare", "ccmprepare_input")
 
    # Create teradataml DataFrame objects. The ccmprepare_input table,
    # ccmprepare_input, is a collection of nine time series consisting
    # of 10 values for each of three variables (expenditure, income,
    # and investment)
    ccmprepare_input = DataFrame.from_table("ccmprepare_input")
 
    # Example - Prepare the given input for CCM.
    ccmprepare_out = CCMPrepare(data=ccmprepare_input,
                        data_partition_column='id'
                        )
 
    # Print the result teradataml DataFrame
    print(ccmprepare_out)
__repr__(self)
Returns the string representation for a CCMPrepare class instance.