Package: teradataml
Teradata Python package for Advanced Analytics.teradataml makes available to Python users a collection of analytic functions that reside on Teradata Vantage. This allows users to perform analytics on Teradata Vantage with no SQL coding. In addition, the teradataml library provides functions for scaling data manipulation and transformation, data filtering and sub-setting, and can be used in conjunction with other open-source python libraries.For community support, please visit theTeradata Community.For Teradata customer support, please visitTeradata Support.Copyright 2023, Teradata. All Rights Reserved.Table of ContentsRelease NotesInstallation and RequirementsUsing the Teradata Python PackageDocumentationLicenseRelease Notes:teradataml 17.20.00.07New Features/FunctionalityOpen Analytics Framework (OpenAF) APIs:Manage all user environments.create_env():new argumentconda_envis added to create a conda environment.list_user_envs():User can list conda environment(s) by using filter with new argumentconda_env.Conda environment(s) can be managed using APIs for installing , updating, removing files/libraries.Bug Fixescolumnsargument forFillNafunction is made optional.Release Notes:teradataml 17.20.00.06New Features/Functionalityteradataml DataFrameColumn a.k.a. ColumnExpressionColumnExpression.nulls_first()- Displays NULL values at first.ColumnExpression.nulls_last()- Displays NULL values at last.Bit Byte Manipulation FunctionsDataFrameColumn.bit_and()- Returns the logical AND operation on the bits from
the column and corresponding bits from the argument.DataFrameColumn.bit_get()- Returns the bit specified by input argument from the column and
returns either 0 or 1 to indicate the value of that bit.DataFrameColumn.bit_or()- Returns the logical OR operation on the bits from the column and
corresponding bits from the argument.DataFrameColumn.bit_xor()- Returns the bitwise XOR operation on the binary representation of the
column and corresponding bits from the argument.DataFrameColumn.bitand()- It is an alias forDataFrameColumn.bit_and()function.DataFrameColumn.bitnot()- Returns a bitwise complement on the binary representation of the column.DataFrameColumn.bitor()- It is an alias forDataFrameColumn.bit_or()function.DataFrameColumn.bitwise_not()- It is an alias forDataFrameColumn.bitnot()function.DataFrameColumn.bitwiseNOT()- It is an alias forDataFrameColumn.bitnot()function.DataFrameColumn.bitxor()- It is an alias forDataFrameColumn.bit_xor()function.DataFrameColumn.countset()- Returns the count of the binary bits within the column that are either set to 1
or set to 0, depending on the input argument value.DataFrameColumn.getbit()- It is an alias forDataFrameColumn.bit_get()function.DataFrameColumn.rotateleft()- Returns an expression rotated to the left by the specified number of bits,
with the most significant bits wrapping around to the right.DataFrameColumn.rotateright()- Returns an expression rotated to the right by the specified number of bits,
with the least significant bits wrapping around to the left.DataFrameColumn.setbit()- Sets the value of the bit specified by input argument to the value
of column.DataFrameColumn.shiftleft()- Returns the expression when value in column is shifted by the specified
number of bits to the left.DataFrameColumn.shiftright()- Returns the expression when column expression is shifted by the specified
number of bits to the right.DataFrameColumn.subbitstr()- Extracts a bit substring from the column expression based on the specified
bit position.DataFrameColumn.to_byte()- Converts a numeric data type to the Vantage byte representation
(byte value) of the column expression value.Regular Expression FunctionsDataFrameColumn.regexp_instr()- Searches string value in column for a match to value specified in argument.DataFrameColumn.regexp_replace()- Replaces the portions of string value in a column that matches the value
specified regex string and replaces with the replace string.DataFrameColumn.regexp_similar()- Compares value in column to value in argument and returns integer value.DataFrameColumn.regexp_substr()- Extracts a substring from column that matches a regular expression
specified in the input argument.Open Analytics Framework (OpenAF) APIs:Manage all user environments.create_env():User can create one or more user environments using newly added argumenttemplateby providing specifications in template json file. New feature allows user to create complete user environment, including file and library installation, in just single function call.UserEnv Class – Manage individual user environment.Properties:models- Supports listing of models in user environment.Methods:install_model()- Install a model in user environment.uninstall_model()- Uninstall a model from user environment.snapshot()- Take the snapshot of the user environment.teradataml: Bring Your Own ModelNew FunctionsDataRobotPredict()- Score the data in Vantage using the model trained externally in datarobot and stored
in Vantage.UpdatesDataFrame.describe()Method now accepts an argumentstatistics, which specifies the aggregate operation to be performed.DataFrame.sort()Method now accepts ColumnExpressions as well.Enables sorting using NULLS FIRST and NULLS LAST.view_log()downloads the Apply query logs based on query id.Arguments which accepts floating numbers will accept integers also forAnalytics Database Analytic Functions.Argumentignore_nullsadded toDataFrame.plot()to ignore the null values while plotting the data.Dataframe.sample()Method supports column stratification.Bug FixesDataFrameColumn.cast()accepts all teradatasqlalchemy types.Minor bug fix related toDataFrame.merge().teradataml 17.20.00.05New Features/Functionalityteradataml: Hyperparameter-Tuning - Technique to identify best model parameters.Hyperparameter tuning is an optimization method to determine the optimal set of
hyperparameters for the given dataset and learning model. teradataml hyperparameter tuning feature
offers best model identification, parallel execution, early stopping feature, best data identification,
model evaluation, model prediction, live logging, input data hyper-parameterization, input data sampling,
numerous scoring functions, hyper-parameterization for non-model trainer functions.GridSearchGridSearch is an exhaustive search algorithm that covers all possible
parameter values to identify optimal hyperparameters.Methods of GridSearch__init__()- Instantiate an object of GridSearch for given model function and parameters.evaluate()- Function to perform evaluation on the given teradataml DataFrame using default model.fit()- Function to perform hyperparameter-tuning for given hyperparameters and model on teradataml DataFrame.get_error_log()- Useful to get the error log if model execution failed, using the model identifier.get_input_data()- Useful to get the input data using the data identifier, when input data is also parameterized.get_model()- Returns the trained model for the given model identifier.get_parameter_grid()- Returns the hyperparameter space used for hyperparameter optimization.is_running()- Returns the execution status of hyperaparameter tuning.predict()- Function to perform prediction on the given teradataml DataFrame using default model.set_model()-  Function to update the default model.Properties of GridSearchbest_data_id- Returns the best data identifier used for model training.best_model- Returns the best trained model.best_model_id- Returns the identifier for best model.best_params_- Returns the best set of hyperparameter.best_sampled_data_- Returns the best sampled data used to train the best model.best_score_- Returns the best trained model score.model_stats- Returns the model evaluation reports.models- Returns the metadata of all the models.RandomSearchRandomSearch algorithm performs random sampling on hyperparameter
space to identify optimal hyperparameters.Methods of RandomSearch__init__()- Instantiate an object of RandomSearch for given model function and parameters.evaluate()- Function to perform evaluation on the given teradataml DataFrame using default model.fit()- Function to perform hyperparameter-tuning for given hyperparameters and model on teradataml DataFrame.get_error_log()- Useful to get the error log if model execution failed, using the model identifier.get_input_data()- Useful to get the input data using the data identifier, when input data is also parameterized.get_model()- Returns the trained model for the given model identifier.get_parameter_grid()- Returns the hyperparameter space used for hyperparameter optimization.is_running()- Returns the execution status of hyperaparameter tuning.predict()- Function to perform prediction on the given teradataml DataFrame using default model.set_model()- Function to update the default model.Properties of GridSearchbest_data_id- Returns the best data identifier used for model training.best_model- Returns the best trained model.best_model_id- Returns the identifier for best model.best_params_- Returns the best set of hyperparameter.best_sampled_data_- Returns the best sampled data used to train the best model.best_score_- Returns the best trained model score.model_stats- Returns the model evaluation reports.models- Returns the metadata of all the models.teradataml: Analytic Functionsteradataml currently has different functions to generate a model, predict, transform and evaluate. All these functions are needed to be invoked individually, i.e., predict(), evaluate(), transform() cannot be invoked using the model trainer function output. Enhancement done to this feature now enables user to invoke these functions as methods of the model trainer function. Below is the list of functions, updated with this enhancement:Analytics Database Analytic FunctionsBincodeFit()- Supportstransform()method.DecisionForest()- Supportspredict(),evaluate()methods.Fit()- Supportstransform()method.GLM()- Supportspredict(),evaluate()methods.GLMPerSegment()- Supportspredict(),evaluate()methods.KMeans()- Supportspredict()method.KNN()- Supportspredict(),evaluate()methods.NaiveBayesTextClassifierTrainer()- Supportspredict(),evaluate()methods.NonLinearCombineFit()- Supportstransform()method.OneClassSVM()- Supportspredict()method.OneHotEncodingFit()- Supportstransform()method.OrdinalEncodingFit()- Supportstransform()method.OutlierFilterFit()- Supportstransform()method.PolynomialFeaturesFit()- Supportstransform()method.RandomProjectionFit()- Supportstransform()method.RowNormalizeFit()- Supportstransform()method.ScaleFit()- Supportstransform()method.SimpleImputeFit()- Supportstransform()method.SVM()- Supportspredict(),evaluate()methods.TargetEncodingFit()- Supportstransform()method.XGBoost()- Supportspredict(),evaluate()methods.Time Series Analytic (UAF) FunctionsArimaEstimate()- Supportsforecast(),validate()methods.DFFT()- Supportsconvolve(),inverse()methods.IDFFT()- Supportsinverse()method.DFFT2()- Supportsconvolve(),inverse()methods.IDFFT2()- Supportsinverse()method.DIFF()- Supportsinverse()method.UNDIFF()- Supportsinverse()method.SeasonalNormalize()- Supportsinverse()method.teradataml: DataFrameNew FunctionsDataFrame.plot()- Generates the below type of plots on teradataml DataFrame.line - Generates line plot.bar - Generates bar plot.scatter - Generates scatter plot.corr - Generates correlation plot.wiggle - Generates a wiggle plot.mesh - Generates a mesh plot.DataFrame.itertuples()- iterate over teradataml DataFrame rows as namedtuples or list.teradataml: GeoDataFrameNew FunctionsGeoDataFrame.plot()- Generate the below type of plots on teradataml GeoDataFrame.line - Generates line plot.bar - Generates bar plot.scatter - Generates scatter plot.corr - Generates correlation plot.wiggle - Generates a wiggle plot.mesh - Generates a mesh plot.geometry - Generates plot on geospatial data.Plot:Axis- Genertes the axis for plot.Figure- Generates the figure for plot.subplots- Helps in generating multiple plots on a singleFigure.Bring Your Own Model (BYOM) Function:DataikuPredict- Score the data in Vantage using the model trained externally in Dataiku UI and stored in Vantage.async_run_status()- Function to check the status of asynchronous run(s) using unique run id(s).teradataml DataFrameColumn a.k.a. ColumnExpressionRegular Arithmetic FunctionsDataFrameColumn.abs()- Computes the absolute value.DataFrameColumn.ceil()- Returns the ceiling value of the column.DataFrameColumn.ceiling()- It is an alias forDataFrameColumn.ceil()function.DataFrameColumn.degrees()- Converts radians value from the column to degrees.DataFrameColumn.exp()- Raises e (the base of natural logarithms) to the power of the value in the column, where e = 2.71828182845905.DataFrameColumn.floor()- Returns the largest integer equal to or less than the value in the column.DataFrameColumn.ln()- Computes the natural logarithm of values in column.DataFrameColumn.log10()- Computes the base 10 logarithm.DataFrameColumn.mod()- Returns the modulus of the column.DataFrameColumn.pmod()- It is an alias forDataFrameColumn.mod()function.DataFrameColumn.nullifzero()- Converts data from zero to null to avoid problems with division by zero.DataFrameColumn.pow()- Computes the power of the column raised to expression or constant.DataFrameColumn.power()- It is an alias forDataFrameColumn.pow()function.DataFrameColumn.radians()- Converts degree value from the column to radians.DataFrameColumn.round()- Returns the rounded off value.DataFrameColumn.sign()- Returns the sign.DataFrameColumn.signum()- It is an alias forDataFrameColumn.sign()function.DataFrameColumn.sqrt()- Computes the square root of values in the column.DataFrameColumn.trunc()- Provides the truncated value of columns.DataFrameColumn.width_bucket()- Returns the number of the partition to which column is assigned.DataFrameColumn.zeroifnull()- Converts data from null to zero to avoid problems with null.Trigonometric FunctionsDataFrameColumn.acos()- Returns the arc-cosine value.DataFrameColumn.asin()- Returns the arc-sine value.DataFrameColumn.atan()- Returns the arc-tangent value.DataFrameColumn.atan2()- Returns the arc-tangent value based on x and y coordinates.DataFrameColumn.cos()- Returns the cosine value.DataFrameColumn.sin()- Returns the sine value.DataFrameColumn.tan()- Returns the tangent value.Hyperbolic FunctionsDataFrameColumn.acosh()- Returns the inverse hyperbolic cosine value.DataFrameColumn.asinh()- Returns the inverse hyperbolic sine value.DataFrameColumn.atanh()- Returns the inverse hyperbolic tangent value.DataFrameColumn.cosh()- Returns the hyperbolic cosine value.DataFrameColumn.sinh()- Returns the hyperbolic sine valueDataFrameColumn.tanh()- Returns the hyperbolic tangent value.String FunctionsDataFrameColumn.ascii()- Returns the decimal representation of the first character in column.DataFrameColumn.char2hexint()- Returns the hexadecimal representation for a character string in a column.DataFrameColumn.chr()- Returns the Latin ASCII character of a given a numeric code value in column.DataFrameColumn.char()- It is an alias forDataFrameColumn.chr()function.DataFrameColumn.character_length()- Returns the number of characters in the column.DataFrameColumn.char_length()- It is an alias forDataFrameColumn.character_length()function.DataFrameColumn.edit_distance()- Returns the minimum number of edit operations required to
transform string in a column into string specified in argument.DataFrameColumn.index()- Returns the position of a string in a column where string specified in argument starts.DataFrameColumn.initcap()- Modifies a string column and returns the string with the first character
of each word in uppercase.DataFrameColumn.instr()- Searches the string in a column for occurrences of search string passed as argument.DataFrameColumn.lcase()- Returns a character string identical to string values in column,
with all uppercase letters replaced with their lowercase equivalents.DataFrameColumn.left()- Truncates string in a column to a specified number of characters desired from
the left side of the string.DataFrameColumn.length()- It is an alias forDataFrameColumn.character_length()function.DataFrameColumn.levenshtein()- It is an alias forDataFrameColumn.edit_distance()function.DataFrameColumn.locate()- Returns the position of the first occurrence of a string in a column within
string in argument.DataFrameColumn.lower()- It is an alias forDataFrameColumn.character_lcase()function.DataFrameColumn.lpad()- Returns the string in a column padded to the left with the characters specified
in argument so that the resulting string has length specified in argument.DataFrameColumn.ltrim()- Returns the string in a column, with its left-most characters removed up
to the first character that is not in the string specified in argument.DataFrameColumn.ngram()- Returns the number of n-gram matches between string in a column,
and string specified in argument.DataFrameColumn.nvp()- Extracts the value of a name-value pair where the name in the pair matches
the name and the number of the occurrence specified.DataFrameColumn.oreplace()- Replaces every occurrence of search string in the column.DataFrameColumn.otranslate()- Returns string in a column with every occurrence of each character in
string in argument replaced with the corresponding character in another argument.DataFrameColumn.replace()- It is an alias forDataFrameColumn.oreplace()function.DataFrameColumn.reverse()- Returns the reverse of string in column.DataFrameColumn.right()- Truncates input string to a specified number of characters desired from
the right side of the string.DataFrameColumn.rpad()- Returns the string in a column padded to the right with the characters specified
in argument so the resulting string has length specified in argument.DataFrameColumn.rtrim()- Returns the string in column, with its right-most characters removed up
to the first character that is not in the string specified in argument.DataFrameColumn.soundex()- Returns a character string that represents the Soundex code for
string in a column.DataFrameColumn.string_cs()- Returns a heuristically derived integer value that can be used to determine
which KANJI1-compatible client character set was used to encode string in a column.DataFrameColumn.translate()- It is an alias forDataFrameColumn.otranslate()function.DataFrameColumn.upper()- Returns a character string with all lowercase letters in a column replaced
with their uppercase equivalents.teradataml OptionsConfiguration Optionsconfigure.indb_install_locationSpecifies the installation location of In-DB Python package.UpdatesOpen Analytics Framework (OpenAF) APIs:set_auth_token()set_auth_token()does not accept username and password anymore. Instead, function opens up a browser session and user should authenticate in browser.After token expiry, teradataml will open a browser and user needs to authenticate again.If client machine does not have browser, then user should copy the URL posted by teradataml and authenticate themselves.Security fixes -auth_tokenis not set or retrieved from theconfigureoption anymore.Manage all user environments.create_env()- supports creation of R environment.remove_env()- Supports removal of remote R environment.remove_all_envs()- Supports removal of all remote R environments.remove_env()andremove_all_envs()supports asynchronous call.UserEnv Class – Supports managing of R remote environments.Properties:libs- Supports listing of libraries in R remote environment.Methods:install_lib()- Supports installing of libraries in remote R environment.uninstall_lib()- Supports uninstalling of libraries in remote R environment.update_lib()- Supports updating of libraries in remote R environment.Unbounded Array Framework (UAF) Functions:ArimaEstimate()Added support forCSSalgorithm viaalgorithmargument.Bug FixesInstallation location of In-DB 2.0.0 package is changed. Script() will now work with both 2.0.0 and previous version.Release Notes:teradataml 17.20.00.04New Features/Functionalityteradataml is now compatible with SQLAlchemy 2.0.XImportant noteswhen user has sqlalchemy version >= 2.0:Users will not be able to run theexecute()method on SQLAlchemy engine object returned byget_context()andcreate_context()teradataml functions. This is due to the SQLAlchemy has
removed the support forexecute()method on the engine object. Thus, user scripts whereget_context().execute()andcreate_context().execute(), is used, Teradata recommends to
replace those with eitherexecute_sql()function exposed by teradataml orexec_driver_sql()method on theConnectionobject returned byget_connection()function in teradataml.Nowget_connection().execute()accepts only executable sqlalchemy object. Refer tosqlalchemy.engine.base.execute()for more details.Teradata recommends to use eitherexecute_sql()function exposed by teradataml orexec_driver_sql()method on theConnectionobject returned byget_connection()function in teradataml, in such cases.New utility functionexecute_sql()is added to execute the SQL.Extending compatibility for MAC with ARM processors.Added support for floor division (//) between two teradataml DataFrame Columns.Analytics Database Analytic Functions:GLMPerSegment()GLMPredictPerSegment()OneClassSVM()OneClassSVMPredict()SVM()SVMPredict()TargetEncodingFit()TargetEncodingTransform()TrainTestSplit()WordEmbeddings()XGBoost()XGBoostPredict()teradataml OptionsDisplay Optionsdisplay.geometry_column_lengthOption to display the default length of geometry column in GeoDataFrame.Updatesset_auth_token()function can generate the client id automatically based on org_id when user do not specify it.Analytics Database Analytic Functions:ColumnTransformer()Does not allow list values for arguments -onehotencoding_fit_dataandordinalencoding_fit_data.OrdidnalEncodingFit()New arguments added -category_data,target_column_names,categories_column,ordinal_values_column.Allows the list of values for arguments -target_column,start_value,default_value.OneHotEncodingFit()New arguments added -category_data,approach,target_columns,categories_column,category_counts.Allows the list of values for arguments -target_column,other_column.Bug FixesDataFrame.sample()method output is now deterministic.copy_to_sql()now preserves the rows of the table even when the view content is copied to the same table name.list_user_envs()does not raise warning when no user environments found.Release Notes:teradataml 17.20.00.03UpdatesDataFrame.joinNew argumentslprefixandrprefixadded.Behavior of argumentslsuffixandrsuffixwill be changed in future, use new arguments instead.New and old affix arguments can now be used independently.Analytic functions can be imported regardless of context creation.
Import after create context constraint is now removed.ReadNOSandWriteNOSnow accept dictionary value forauthorizationandrow_formatarguments.WriteNOSsupports writing CSV files to external store.Following model cataloging APIs will be deprecated in future:describe_modeldelete_modellist_modelspublish_modelretrieve_modelsave_modelBug Fixescopy_to_sql()bug related to NaT value has been fixed.Tooltip on PyCharm IDE now points to SQLE.valueargument ofFillNa(), a Vantage Analytic Library function supports special characters.casefunction accepts DataFrame column as value inwhensargument.Release Notes:teradataml 17.20.00.02New Features/Functionalityteradataml: Open AnalyticsNew Functionsset_auth_token()- Sets the JWT token automatically for using Open AF API's.teradataml OptionsDisplay Optionsdisplay.suppress_vantage_runtime_warningsSuppresses the VantageRuntimeWarning raised by teradataml, when set to True.UpdatesSimpleImputeFit function argumentsstats_columnsandstatsare made to be optional.New argumenttable_formatis added to ReadNOS().Argumentfull_scanis changed toscan_pctin ReadNOS().Bug FixesMinor bug fix related to read_csv.APPLY andDataFrame.apply()supports hash by and local order by.Output column names are changed for DataFrame.dtypes and DataFrame.tdtypes.Release Notes:teradataml 17.20.00.01New Features/Functionalityteradataml: DataFrameNew FunctionsDataFrame.pivot()- Rotate data from rows into columns to create easy-to-read DataFrames.DataFrame.unpivot()- Rotate data from columns into rows to create easy-to-read DataFrames.DataFrame.drop_duplicate()- Drop duplicate rows from teradataml DataFrame.New propertiesDataframe.is_art- Check whether teradataml DataFrame is created on an Analytic Result Table, i.e., ART table or not.teradataml:  Unbounded Array Framework (UAF) Functions:New FunctionsNew Functions Supported on Database Versions: 17.20.x.xMODEL PREPARATION AND PARAMETER ESTIMATION functions:ACF()ArimaEstimate()ArimaValidate()DIFF()LinearRegr()MultivarRegr()PACF()PowerTransform()SeasonalNormalize()Smoothma()UNDIFF()Unnormalize()SERIES FORECASTING functions:ArimaForecast()DTW()HoltWintersForecaster()MAMean()SimpleExp()DATA PREPARATION functions:BinaryMatrixOp()BinarySeriesOp()GenseriesFormula()MatrixMultiply()Resample()DIAGNOSTIC STATISTICAL TEST functions:BreuschGodfrey()BreuschPaganGodfrey()CumulPeriodogram()DickeyFuller()DurbinWatson()FitMetrics()GoldfeldQuandt()Portman()SelectionCriteria()SignifPeriodicities()SignifResidmean()WhitesGeneral()TEMPORAL AND SPATIAL functions:Convolve()Convolve2()DFFT()DFFT2()DFFT2Conv()DFFTConv()GenseriesSinusoids()IDFFT()IDFFT2()LineSpec()PowerSpec()GENERAL UTILITY functions:ExtractResults()InputValidator()MInfo()SInfo()TrackingOp()New Features: Inputs to Unbounded Array Framework (UAF) functionsTDAnalyticResult()- Allows to prepare function output generated by UAF functions to be passed.TDGenSeries()- Allows to generate a series, that can be passed to a UAF function.TDMatrix()- Represents a Matrix in time series, that can be created from a teradataml DataFrame.TDSeries()- Represents a Series in time series, that can be created from a teradataml DataFrame.UpdatesNative Object Store (NOS) functions support authorization by specifying authorization object.display_analytic_functions()categorizes the analytic functions based on function type.ColumnTransformer accepts multiple values for arguments nonlinearcombine_fit_data,
onehotencoding_fit_data, ordinalencoding_fit_data.Bug FixesRedundant warnings thrown by teradataml are suppressed.OpenAF supports when context is created with JWT Token.New argument "match_column_order" added to copy_to_sql, that allows DataFrame loading with any column order.copy_to_sqlupdated to map data type timezone(tzinfo) to TIMESTAMP(timezone=True), instead of VARCHAR.Improved performance for DataFrame.sum and DataFrameColumn.sum functions.Release Notes:teradataml 17.20.00.00New Features/Functionalityteradataml: Analytics Database Analytic FunctionsNew FunctionsNew Functions Supported on Database Versions: 17.20.x.xANOVA()​ClassificationEvaluator()​ColumnTransformer()​DecisionForest()GLM​()GetFutileColumns()KMeans()​KMeansPredict()​​NaiveBayesTextClassifierTrainer()​NonLinearCombineFit()​NonLinearCombineTransform()​OrdinalEncodingFit​()OrdinalEncodingTransform()​RandomProjectionComponents​()RandomProjectionFit​()RandomProjectionTransform()​RegressionEvaluator​()ROC​()SentimentExtractor()​Silhouette​()TDGLMPredict​()TextParser​()VectorDistance()Updatesdisplay_analytic_functions()categorizes the analytic functions based on function type.Users can provide range value for columns argument.teradataml: Open AnalyticsManage all user environments.list_base_envs()- list the available python base versions.​create_env()- create a new user environment. ​get_env()- get existing user environment.list_user_envs()- list the available user environments.​remove_env()- delete user environment.​remove_all_envs()- delete all the user environments.UserEnv Class – Manage individual user environment.Propertiesfiles- Get files in user environment.libs- Get libraries in user environment.Methodsinstall_file()- Install a file in user environment.​remove_file()- Remove a file in user environment.​install_lib()- Install a library in user environment.​update_lib()- Update a library in user environment.​uninstall_lib()- Uninstall a library in user environment.​status()- Check the status of​file installation​library installation​library update​library uninstallation​refresh()- Refresh the environment details in local client.Apply Class – Execute a user script on VantageCloud Lake.​__init__()- Instantiate an object of apply for script execution.​install_file()- Install a file in user environment.​remove_file()- Remove a file in user environment.​set_data()– Reset data and related arguments.​execute_script()– Executes Python script.teradataml: DataFrameNew FunctionsDataFrame.apply()- Execute a user defined Python function on VantageLake Cloud.teradataml: Bring Your Own ModelNew FunctionsONNXPredict()- Score using model trained externally on ONNX and stored in Vantage.teradataml: OptionsNew Functionsset_config_params() New API to set all config params in one go.New Configuration OptionsFor Open Analytics support.​ues_url – User Environment Service URL for VantageCloud Lake.​auth_token – Authentication token to connect to VantageCloud Lake.certificate_file – Path to a CA_BUNDLE file or directory with certificates of trusted CAs.Updatesaccumulateargument is working forScaleTransform().Following functions haveaccumulateargument added on Database Versions: 17.20.x.xConvertTo()GetRowsWithoutMissingValues()GetRowsWithoutMissingValues()OutlierFilterFit()supports multiple output.ForOutlierFilterFit()function below arguments are optional in teradataml 17.20.x.xlower_percentileupper_percentileoutlier_methodreplacement_valuepercentile_methodAnalytics Database analytic functions – In line help, i.e., help() for the functions
is available.​Bug FixesVantage Analytic Library FillNa() function: Nowcolumnsargument is required.output_responsesargument in MLE functionDecisionTreePredict(), does not allow empty string.teradataml closes docker sandbox environment properly.Users can create context using JWT token.teradataml 17.10.00.02New Features/FunctionalityDatabase Utilitylist_td_reserved_keywords()- Validates if the specified string is Teradata reserved
keyword or not, else lists down all the Teradata reserved keywords.UpdatesDataFrameUpdatesMultiple columns can be selected using slice operator ([]).ScriptUpdatesA warning will be raised, when Teradata reserved keyword is used in Script local mode.Bug FixesNumeric overflow issue observed for describe(), sum(), csum(), and mean() has been fixed.Error messages are updated for SQLE function arguments accepting multiple datatypes.Error messages are updated for SQLE function arguments volatile and persist arguments when
non-boolean value is provided.DataFrame sample() method can handle column names with special characters like space, hyphen,
period etc.In-DB SQLE functions can be loaded for any locale setting.create_context()- Password containing special characters requires URL encoding as perhttps://docs.microfocus.com/OMi/10.62/Content/OMi/ExtGuide/ExtApps/URL_encoding.html.
teradataml has added a fix to take care of the URL encoding of the password while creating a context.
Also, a new argument is added to give a more control over the URL encoding to be done at the time of context creation.teradataml 17.10.00.01New Features/FunctionalityGeospatialThe Geospatial feature in teradataml enables data manipulation, exploration and analysis on tables, views, and queries on Teradata Vantage that contains Geospatial data.Geomtery TypesPointLineStringPolygonMultiPointMultiLineStringMultiPolygonGeometryCollectionGeoSequenceteradataml GeoDataFramePropertiescolumnsdtypesgeometryilocindexlocshapesizetdtypesGeospatial Specific PropertiesProperties for all Types of Geometriesboundarycentroidconvex_hellcoord_dimdimensiongeom_typeis_3Dis_emptyis_simpleis_validmax_xmax_ymax_zmin_xmin_ymin_zsridProperties for Point GeometryxyzProperties for LineString Geometryis_closed_3Dis_closedis_ringProperties for Polygon GeometryareaexteriorperimeterMethods__getattr__()__getitem__()__init__()__repr__()assign()concat()count()drop()dropna()filter()from_query()from_table()get()get_values()groupby()head()info()join()keys()merge()sample()select()set_index()show_query()sort()sort_index()squeeze()tail()to_csv()to_pandas()to_sql()Geospatial Specific MethodsMethods for All Type of Geometrybuffer()contains()crosses()difference()disjoint()distance()distance_3D()envelope()geom_equals()intersection()intersects()make_2D()mbb()mbr()overlaps()relates()set_exterior()set_srid()simplify()sym_difference()to_binary()to_text()touches()transform()union()within()wkb_geom_to_sql()wkt_geom_to_sql()Methods for Point Geometryspherical_buffer()spherical_distance()spheriodal_buffer()spheriodal_distance()set_x()set_y()set_z()Methods for LineString Geometryend_point()length()length_3D()line_interpolate_point()num_points()point()start_point()Methods for Polygon Geometryinteriors()num_interior_ring()point_on_surface()Methods for GeometryCollection Geometrygeom_component()num_geometry()Methods for GeoSequence Geometryclip()get_final_timestamp()get_init_timestamp()get_link()get_user_field()get_user_field_count()point_heading()set_link()speed()Filtering Functions and Methodsintersects_mbb()mbb_filter()mbr_filter()within_mbb()teradataml GeoDataFrameColumnGeospatial Specific PropertiesProperties for all Types of Geometriesboundarycentroidconvex_hellcoord_dimdimensiongeom_typeis_3Dis_emptyis_simpleis_validmax_xmax_ymax_zmin_xmin_ymin_zsridProperties for Point GeometryxyzProperties for LineString Geometryis_closed_3Dis_closedis_ringProperties for Polygon GeometryareaexteriorperimeterGeospatial Specific MethodsMethods for All Type of Geometrybuffer()contains()crosses()difference()disjoint()distance()distance_3D()envelope()geom_equals()intersection()intersects()make_2D()mbb()mbr()overlaps()relates()set_exterior()set_srid()simplify()sym_difference()to_binary()to_text()touches()transform()union()within()wkb_geom_to_sql()wkt_geom_to_sql()Methods for Point Geometryspherical_buffer()spherical_distance()spheriodal_buffer()spheriodal_distance()set_x()set_y()set_z()Methods for LineString Geometryendpoint()length()length_3D()line_interpolate_point()num_points()point()start_point()Methods for Polygon Geometryinteriors()num_interior_ring()point_on_surface()Methods for GeometryCollection Geometrygeom_component()num_geometry()Methods for GeoSequence Geometryclip()get_final_timestamp()get_init_timestamp()get_link()get_user_field()get_user_field_count()point_heading()set_link()speed()Filtering Functions and Methodsintersects_mbb()mbb_filter()mbr_filter()within_mbb()teradataml DataFrameNew Functionsto_csv()teradataml: SQLE Engine Analytic FunctionsNew FunctionsNewly added SQLE functions are accessible only after establishing the connection to Vantage.display_analytic_functions()API displays all the available SQLE Analytic functions based on database version.Functions Supported on DatabaseVersions: 16.20.x.x, 17.10.x.x, 17.05.x.xAntiselect()Attribution()DecisionForestPredict()DecisionTreePredict()GLMPredict()MovingAverage()NaiveBayesPredict()NaiveBayesTextClassifierPredict()NGramSplitter()NPath()Pack()Sessionize()StringSimilarity()SVMParsePredict()Unpack()Functions Supported on DatabaseVersions: 17.10.x.xAntiselect()Attribution()BincoodeFit()BncodeTransform()CategoricalSummary()ChiSq()ColumnSummary()ConvertTo()DecisionForestPredict()DecisionTreePredict()GLMPredict()FillRowId()FTest()Fit()Transform()GetRowsWithMissingValues()GetRowsWithoutMissingValues()MovingAverage()Histogram()NaiveBayesPredict()NaiveBayesTextClassifierPredict()NGramSplitter()NPath()NumApply()OneHotEncodingFit()OneHotEncodingTransform()OutlierFilterFit()OutlierFilterTransform()Pack()PolynomialFeatuesFit()PolynomialFeatuesTransform()QQNorm()RoundColumns()RowNormalizeFit()RowNormalizeTransform()ScaleFit()ScaleTransform()Sessionize()SimpleImputeFit()SimpleImputeTransform()StrApply()StringSimilarity()SVMParsePredict()UniVariateStatistics()Unpack()WhichMax()WhichMin()ZTest()teradataml: General FunctionsNew FunctionsData Transfer Utilityread_csv()OperatorsNew FunctionsTable Operatorsread_nos()write_nos()teradataml: Bring Your Own ModelNew FunctionsModel Catalogingget_license()set_byom_catalog()set_license()Updatesteradataml: General FunctionsData Transfer Utilitycopy_to_sql()- New argument "chunksize" added to load data in chunks.Following Data Transfer Utility Functions updated to specify the number of Teradata sessions to open for data transfer using "open_session" argument:fastexport()fastload()to_pandas()OperatorsFollowing Set Operator Functions updated to work with Geospatial data:concat()td_intersect()td_expect()td_minus()teradataml: Bring Your Own ModelModel cataloging APIs mentioned below are updated to use session level parameters set byset_byom_catalog()andset_license()such as table name, schema name and license details respectively.delete_byom()list_byom()retrieve_byom()save_byom()view_log()- Allows user to view BYOM logs.Bug FixesCS0733758 -db_python_package_details()function is fixed to support latest STO release for pip and Python aliases used.DataFrameprint()issue related toResponse Row size is greater than the 1MB allowed maximum.has been fixed to print the data with lot of columns.New parameter "chunksize" is added toDataFrame.to_sql()andcopy_to_sql()to fix the issue where the function was failing with error - "Request requires too many SPOOL files.". Reducing the chunksize than the default one will result in successful operation.remove_context()is fixed to remove the active connection from database.Support added to specify the number of Teradata data transfer sessions to open for data transfer usingfastexport()andfastload()functions.DataFrame.to_sql()is fixed to support temporary table when default database differs from the username.DataFrame.to_pandas()now by default support data transfer using regular method. Change is carried out for user to allow the data transfer if utility throttles are configured, i.e., TASM configuration does not support data export using FastExport.save_byom()now notifies if VARCHAR column is trimmed out if data passed to the API is greater than the length of the VARCHAR column.Standard error can now be captured forDataFrame.map_row()andDataFrame.map_parition()when executed in LOCAL mode.Vantage Analytic Library - Underlying SQL can be retrieved using newly added arguments "gen_sql"/"gen_sql_only" for the functions. Query can be viewed with the helpshow_query().Documentation example has been fixed forfastexport()to show the correct import statement.teradataml 17.00.00.05Fixed [CS0733758] db_python_package_details() fails on recent STO release due to changes in pip and python aliases.teradataml 17.00.00.04New Features/FunctionalityAnalytic FunctionsBring Your Own Analytics Functions
The BYOM feature in Vantage provides flexibility to score the data in Vantage using external models using following BYOM functions:H2OPredict()- Score using model trained externally in H2O and stored in Vantage.PMMLPredict()- Score using model trained externally in PMML and stored in Vantage.BYOM Model Catalog APIssave_byom()- Save externally trained models in Teradata Vantage.delete_byom()- Delete a model from the user specified table in Teradata Vantage.list_byom()- List models.retrieve_byom()- Function to retrieve a saved model.Vantage Analytic Library FunctionsNew FunctionsXmlToHtmlReport()- Transforms XML output of VAL functions to HTML.teradataml DataFrameDataFrame.window()- Generates Window object on a teradataml DataFrame to run window aggregate functions.DataFrame.csum()- Returns column-wise cumulative sum for rows in the partition of the dataframe.DataFrame.mavg()- Returns moving average for the current row and the preceding rows.DataFrame.mdiff()- Returns moving difference for the current row and the preceding rows.DataFrame.mlinreg()- Returns moving linear regression for the current row and the preceding rows.DataFrame.msum()- Returns moving sum for the current row and the preceding rows.Regular Aggregate FunctionsDataFrame.corr()- Returns the Sample Pearson product moment correlation coefficient.DataFrame.covar_pop()- Returns the population covariance.DataFrame.covar_samp()- Returns the sample covariance.DataFrame.regr_avgx()- Returns the mean of the independent variable.DataFrame.regr_avgy()- Returns the mean of the dependent variable.DataFrame.regr_count()- Returns the count of the dependent and independent variable arguments.DataFrame.rege_intercept()- Returns the intercept of the univariate linear regression line.DataFrame.regr_r2()- Returns the coefficient of determination.DataFrame.regr_slope()- Returns the slope of the univariate linear regression line through.DataFrame.regr_sxx()- Returns the sum of the squares of the independent variable expression.DataFrame.regr_sxy()- Returns the sum of the products of the independent variable and the dependent variable.DataFrame.regr_syy()- Returns the sum of the squares of the dependent variable expression.teradataml DataFrameColumn a.k.a. ColumnExpressionColumnExpression.window()- Generates Window object on a teradataml DataFrameColumn to run window aggregate functions.ColumnExpression.desc()- Sorts ColumnExpression in descending order.ColumnExpression.asc()- Sorts ColumnExpression in ascending order.ColumnExpression.distinct()- Removes duplicate value from ColumnExpression.Regular Aggregate FunctionsColumnExpression.corr()- Returns the Sample Pearson product moment correlation coefficient.ColumnExpression.count()- Returns the column-wise count.ColumnExpression.covar_pop()- Returns the population covariance.ColumnExpression.covar_samp()- Returns the sample covariance.ColumnExpression.kurtosis()- Returns kurtosis value for a column.ColumnExpression.median()- Returns column-wise median value.ColumnExpression.max()- Returns the column-wise max value.ColumnExpression.mean()- Returns the column-wise average value.ColumnExpression.min()- Returns the column-wise min value.ColumnExpression.regr_avgx()- Returns the mean of the independent variable.ColumnExpression.regr_avgy()- Returns the mean of the dependent variable.ColumnExpression.regr_count()- Returns the count of the dependent and independent variable arguments.ColumnExpression.rege_intercept()- Returns the intercept of the univariate linear regression line.ColumnExpression.regr_r2()- Returns the coefficient of determination arguments.ColumnExpression.regr_slope()- Returns the slope of the univariate linear regression line.ColumnExpression.regr_sxx()- Returns the sum of the squares of the independent variable expression.ColumnExpression.regr_sxy()- Returns the sum of the products of the independent variable and the dependent variable.ColumnExpression.regr_syy()- Returns the sum of the squares of the dependent variable expression.ColumnExpression.skew()- Returns skew value for a column.ColumnExpression.std()- Returns the column-wise population/sample standard deviation.ColumnExpression.sum()- Returns the column-wise sum.ColumnExpression.var()- Returns the column-wise population/sample variance.ColumnExpression.percentile()- Returns the column-wise percentile.teradataml Window - Window Aggregate FunctionsFollowing set ofWindow Aggregate Functionsreturn the results over a specified window which can be of any type:Cumulative/Expanding windowMoving/Rolling windowContracting/Remaining windowGrouping windowWindow Aggregate FunctionsWindow.corr()- Returns the Sample Pearson product moment correlation coefficient.Window.count()- Returns the count.Window.covar_pop()- Returns the population covariance.Window.covar_samp()- Returns the sample covariance.Window.cume_dist()- Returns the cumulative distribution of values.Window.dense_Rank()- Returns the ordered ranking of all the rows.Window.first_value()- Returns the first value of an ordered set of values.Window.lag()- Returns data from the row preceding the current row at a specified offset value.Window.last_value()- Returns the last value of an ordered set of values.Window.lead()- Returns data from the row following the current row at a specified offset value.Window.max()- Returns the column-wise max value.Window.mean()- Returns the column-wise average value.Window.min()- Returns the column-wise min value.Window.percent_rank()- Returns the relative rank of all the rows.Window.rank()- Returns the rank (1 … n) of all the rows.Window.regr_avgx()- Returns the mean of the independent variable arguments.Window.regr_avgy()- Returns the mean of the dependent variable arguments.Window.regr_count()- Returns the count of the dependent and independent variable arguments.Window.rege_intercept()- Returns the intercept of the univariate linear regression line arguments.Window.regr_r2()- Returns the coefficient of determination arguments.Window.regr_slope()- Returns the slope of the univariate linear regression line.Window.regr_sxx()- Returns the sum of the squares of the independent variable expression.Window.regr_sxy()- Returns the sum of the products of the independent variable and the dependent variable.Window.regr_syy()- Returns the sum of the squares of the dependent variable expression.Window.row_number()- Returns the sequential row number.Window.std()- Returns the column-wise population/sample standard deviation.Window.sum()- Returns the column-wise sum.Window.var()- Returns the column-wise population/sample variance.General functionsNew functionsfastexport()- Exports teradataml DataFrame to Pandas DataFrame using FastExport data transfer protocol.teradataml OptionsDisplay Optionsdisplay.blob_lengthSpecifies default display length of BLOB column in teradataml DataFrame.Configuration Optionsconfigure.temp_table_databaseSpecifies database name for storing the tables created internally.configure.temp_view_databaseSpecifies database name for storing the views created internally.configure.byom_install_locationSpecifies the install location for the BYOM functions.configure.val_install_locationSpecifies the install location for the Vantage Analytic Library functions.Updatesteradataml DataFrameto_pandas()-Support added to transfer data to Pandas DataFrame using fastexport protocol improving the performance.Support added for other arguments similar to Pandasread_sql():coerce_floatparse_datesAnalytic functionsVantage Analytic Library FunctionsSupport added to accept datetime.date object for literals/values in
following transformation functions:FillNa()Binning()OneHotEncoder()LabelEncoder()All transformation functions now supports accepting
teradatasqlalchemy datatypes as input to "datatype" argument for
casting the result.Bug Fixes.CS0249633 - Support added for teradataml to work with user/database/tablename
containing period (.).CS0086594 - Use of dbc.tablesvx versus dbc.tablesvx in teradatasqlalchemy.IPython integration to print the teradataml DataFrames in pretty format.teradataml DataFrame APIs now support column names same as that of Teradata
reserved keywords.Issue has been fixed for duplicate rows being loaded via teradataml
fastload() API.VAL - Empty string now can be passed as input for recoding values using
LabelEncoder.teradataml extension with SQLAlchemy functions:mod() function is fixed to return correct datatype.sum() function is fixed to return correct datatype.teradataml 17.00.00.03New release of SQLAlchemy1.4.x introduced backward compatibility issue. A fix has been carried out so that teradataml can support latest SQLAlchemy changes.Other minor bug fixes.teradataml 17.00.00.02Fixed the internal library load issue related to the GCC version discrepancies on CentOS platform.teradataml 17.00.00.01New Features/FunctionalityAnalytic FunctionsVantage Analytic Library
teradataml now supports executing analytic functions offered by Vantage Analytic Library.
These functions are available via new 'valib' sub-package of teradataml.
Following functions are added as part of this:Association Rules:Association()Descriptive Statistics:AdaptiveHistogram()Explore()Frequency()Histogram()Overlaps()Statistics()TextAnalyzer()Values()Decision Tree:DecisionTree()DecisionTreePredict()DecisionTreeEvaluator()Fast K-Means Clustering:KMeans()KMeansPredict()Linear Regression:LinReg()LinRegPredict()Logistic Regression:LogReg()LogRegPredict()LogRegEvaluator()Factor Analysis:PCA()PCAPredict()PCAEvaluator()Matrix Building:Matrix()Statistical Tests:BinomialTest()ChiSquareTest()KSTest()ParametricTest()RankTest()Variable Transformation:Transform()Transformation Techniques supported for variable transformation:Binning()- Perform bin coding to replaces continuous numeric column with a
categorical one to produce ordinal values.Derive()- Perform free-form transformation done using arithmetic formula.FillNa()- Perform missing value/null replacement transformations.LabelEncoder()- Re-express categorical column values into a new coding scheme.MinMaxScalar()- Rescale data limiting the upper and lower boundaries.OneHotEncoder()- Re-express a categorical data element as one or more
numeric data elements, creating a binary numeric field for each
categorical data value.Retain()- Copy one or more columns into the final analytic data set.Sigmoid()- Rescale data using sigmoid or s-shaped functions.ZScore()- Rescale data using Z-Score values.ML Engine Functions (mle)Correlation2NaiveBayesTextClassifier2DataFrameNew FunctionsDataFrame.map_row()- Function to apply a user defined function to each row in the
teradataml DataFrame.DataFrame.map_partition()- Function to apply a user defined function to a group or
partition of rows in the teradataml DataFrame.New PropertyDataFrame.tdtypes- Get the teradataml DataFrame metadata containing column names and
corresponding teradatasqlalchemy types.General functionsNew functionsDatabase Utility Functionsdb_python_package_details()- Lists the details of Python packages installed on Vantage.General Utility Functionsprint_options()view_log()setup_sandbox_env()copy_files_from_container()cleanup_sandbox_env()Updatescreate_context()Supports all connection parameters supported by teradatasql.connect().Scripttest_script()can now be executed in 'local' mode, i.e., outside of the sandbox.Script.setup_sto_env()is deprecated. Usesetup_sandbox_env()function instead.Added support for using "quotechar" argument.Analytic functionsUpdatesVisit teradataml User Guide to know more about the updates done to ML Engine analytic
functions. Following type of updates are done to several functions:New arguments are added, which are supported only on Vantage Version 1.3.Default value has been updated for few function arguments.Few arguments were required, but now they are optional.Minor Bug Fixes.teradataml 17.00.00.00New Features/FunctionalityModel Cataloging - Functionality to catalog model metadata and related information in the Model Catalog.save_model()- Save a teradataml Analytic Function model.retrieve_model()- Retrieve a saved model.list_model()- List accessible models.describe_model()- List the details of a model.delete_model()- Remove a model from Model Catalog.publish_model()- Share a model.Script - An interface to the SCRIPT table operator object in the Advanced SQL Engine.Interface offers execution in two modes:Test/Debug - to test user scripts locally in a containerized environment.
Supporting methods:setup_sto_env()- Set up test environment.test_script()- Test user script in containerized environment.set_data()- Set test data parameters.In-Database Script Execution - to execute user scripts in database.
Supporting methods:execute_script()- Execute user script in Vantage.install_file()- Install or replace file in Database.remove_file()- Remove installed file from Database.set_data()- Set test data parameters.DataFrameDataFrame.show_query()- Show underlying query for DataFrame.Regular AggregatesNew functionskurtosis()- Calculate the kurtosis value.skew()- Calculate the skewness of the distribution.UpdatesNew argumentdistinctis added to following aggregates to exclude duplicate values.count()max()mean()min()sum()std()New argumentpopulationis added to calculate the population standard deviation.var()New argumentpopulationis added to calculate the population variance.Time Series AggregatesNew functionskurtosis()- Calculate the kurtosis value.count()- Get the total number of values.max()- Calculate the maximum value.mean()- Calculate the average value.min()- Calculate the minimum value.percentile()- Calculate the desired percentile.skew()- Calculate the skewness of the distribution.sum()- Calculate the column-wise sum value.std()- Calculate the sample and population standard deviation.var()- Calculate the sample and population standard variance.General functionsNew functionsDatabase Utility Functionsdb_drop_table()db_drop_view()db_list_tables()Vantage File Management Functionsinstall_file()- Install a file in Database.remove_file()- Remove an installed file from Database.Updatescreate_context()Support added for Stored Password Protection feature.Kerberos authentication bug fix.New argumentdatabaseadded tocreate_context()API, that allows user to specify connecting database.Analytic functionsNew functionsBetweennessClosenessFMeasureFrequentPathsIdentityMatchInterpolatorROCUpdatesNew methods are added to all analytic functionsshow_query()get_build_time()get_prediction_type()get_target_column()New properties are added to analytic function's Formula argumentresponse_columnnumeric_columnscategorical_columnsall_columnsteradataml 16.20.00.06Fixed the DataFrame data display corruption issue observed with certain analytic functions.teradataml 16.20.00.05Compatible with Vantage 1.1.1.The following ML Engine (teradataml.analytics.mle) functions have new and/or updated arguments to support the Vantage version:AdaBoostPredictDecisionForestPredictDecisionTreePredictGLMPredictLDANaiveBayesPredictNaiveBayesTextClassifierPredictSVMDensePredictSVMSparseSVMSparsePredictXGBoostPredictteradataml 16.20.00.04ImprovementsDataFrame creation is now quicker, impacting many APIs and Analytic functions.Improved performance by reducing the number of intermediate queries issued to Teradata Vantage when not required.The number of queries reduced by combining multiple operations into a single step whenever possible and unless the user expects or demands to see the intermediate results.The performance improvement is almost proportional to the number of chained and unexecuted operations on a teradataml DataFrame.Reduced number of intermediate internal objects created on Vantage.New Features/FunctionalityGeneral functionsNew functionsshow_versions()- to list the version of teradataml and dependencies installed.fastload()- for high performance data loading of large amounts of data into a table on Vantage. Requiresteradatasqlversion16.20.0.48or above.Set operators:concattd_intersecttd_excepttd_minuscase()- to help construct SQL CASE based expressions.Updatescopy_to_sqlAdded support tocopy_to_sqlto save multi-level index.Corrected the type mapping for index when being saved.create_context()updated to support 'JWT' logon mechanism.Analytic functionsNew functionsNERTrainerNERExtractorNEREvaluatorGLML1L2GLML1L2PredictUpdatesAdded support to categorize numeric columns as categorical while using formula -as_categorical()in theteradataml.common.formulamodule.DataFrameAdded support to create DataFrame from Volatile and Primary Time Index tables.DataFrame.sample()- to sample data.DataFrame.index- Property to accessindex_labelof DataFrame.Functionality to process Time Series DataGrouping/Resampling time series data:groupby_time()resample()Time Series Aggregates:bottom()count()describe()delta_t()mad()median()mode()first()last()top()DataFrame API and method argument validation added.DataFrame.info()- Default value fornull_countsargument updated fromNonetoFalse.Dataframe.merge()updated to accept columns expressions along with column names toon,left_on,right_onarguments.DataFrame Column/ColumnExpression methodscast()- to help cast the column to a specified type.isin()and~isin()- to check the presence of values in a column.Removed deprecated Analytic functionsAll the deprecated Analytic functions under theteradataml.analytics modulehave been removed.
Newer versions of the functions are available under theteradataml.analytics.mleand theteradataml.analytics.sqlemodules.
The modules removed are:teradataml.analytics.Antiselectteradataml.analytics.Arimateradataml.analytics.ArimaPredictorteradataml.analytics.Attributionteradataml.analytics.ConfusionMatrixteradataml.analytics.CoxHazardRatioteradataml.analytics.CoxPHteradataml.analytics.CoxSurvivalteradataml.analytics.DecisionForestteradataml.analytics.DecisionForestEvaluatorteradataml.analytics.DecisionForestPredictteradataml.analytics.DecisionTreeteradataml.analytics.DecisionTreePredictteradataml.analytics.GLMteradataml.analytics.GLMPredictteradataml.analytics.KMeansteradataml.analytics.NGramsteradataml.analytics.NPathteradataml.analytics.NaiveBayesteradataml.analytics.NaiveBayesPredictteradataml.analytics.NaiveBayesTextClassifierteradataml.analytics.NaiveBayesTextClassifierPredictteradataml.analytics.Packteradataml.analytics.SVMSparseteradataml.analytics.SVMSparsePredictteradataml.analytics.SentenceExtractorteradataml.analytics.Sessionizeteradataml.analytics.TFteradataml.analytics.TFIDFteradataml.analytics.TextTaggerteradataml.analytics.TextTokenizerteradataml.analytics.Unpackteradataml.analytics.VarMaxteradataml 16.20.00.03Fixed the garbage collection issue observed withremove_context()when context is created using a SQLAlchemy engine.Added 4 new Advanced SQL Engine (was NewSQL Engine) analytic functions supported only on Vantage 1.1:Antiselect,Pack,StringSimilarity, andUnpack.Updated the Machine Learning EngineNGramsfunction to work with Vantage 1.1.teradataml 16.20.00.02Python version 3.4.x will no longer be supported. The Python versions supported are 3.5.x, 3.6.x, and 3.7.x.Major issue with the usage of formula argument in analytic functions with Python3.7 has been fixed, allowing this package to be used with Python3.7 or later.Configurable alias name support for analytic functions has been added.Support added to create_context (connect to Teradata Vantage) with different logon mechanisms.
Logon mechanisms supported are: 'TD2', 'TDNEGO', 'LDAP' & 'KRB5'.copy_to_sql function and DataFrame 'to_sql' methods now provide following additional functionality:Create Primary Time Index tables.Create set/multiset tables.New DataFrame methods are added: 'median', 'var', 'squeeze', 'sort_index', 'concat'.DataFrame method 'join' is now updated to make use of ColumnExpressions (df.column_name) for the 'on' clause as opposed to strings.Series is supported as a first class object by calling squeeze on DataFrame.Methods supported by teradataml Series are: 'head', 'unique', 'name', '__repr__'.Binary operations with teradataml Series is not yet supported. Try using Columns from teradataml.DataFrames.Sample datasets and commands to load the same have been provided in the function examples.New configuration property has been added 'column_casesenitive_handler'. Useful when one needs to play with case sensitive columns.teradataml 16.20.00.01New support has been added for Linux distributions: Red Hat 7+, Ubuntu 16.04+, CentOS 7+, SLES12+.16.20.00.01 now has over 100 analytic functions. These functions have been organized into their own packages for better control over which engine to execute the analytic function on. Due to these namespace changes, the old analytic functions have been deprecated and will be removed in a future release. See the Deprecations section in the Teradata Python Package User Guide for more information.New DataFrame methodsshape,iloc,describe,get_values,merge, andtail.New Series methods for NA checking (isnull,notnull) and string processing (lower,strip,contains).teradataml 16.20.00.00teradataml 16.20.00.00is the first release version. Please refer to theTeradata Python Package User Guidefor a list of Limitations and Usage Considerations.Installation and RequirementsPackage Requirements:Python 3.5 or laterNote: 32-bit Python is not supported.Minimum System Requirements:Windows 7 (64Bit) or latermacOS 10.9 (64Bit) or laterRed Hat 7 or later versionsUbuntu 16.04 or later versionsCentOS 7 or later versionsSLES 12 or later versionsTeradata Vantage Advanced SQL Engine:Advanced SQL Engine 16.20 Feature Update 1 or laterFor a Teradata Vantage system with the ML Engine:Teradata Machine Learning Engine 08.00.03.01 or laterInstallationUse pip to install the Teradata Python Package for Advanced Analytics.PlatformCommandmacOS/Linuxpip install teradatamlWindowspy -3 -m pip install teradatamlWhen upgrading to a new version of the Teradata Python Package, you may need to use pip install's--no-cache-diroption to force the download of the new version.PlatformCommandmacOS/Linuxpip install --no-cache-dir -U teradatamlWindowspy -3 -m pip install --no-cache-dir -U teradatamlUsing the Teradata Python PackageYour Python script must import theteradatamlpackage in order to use the Teradata Python Package:>>> import teradataml as tdml
>>> from teradataml import create_context, remove_context
>>> create_context(host = 'hostname', username = 'user', password = 'password')
>>> df = tdml.DataFrame('iris')
>>> df

   SepalLength  SepalWidth  PetalLength  PetalWidth             Name
0          5.1         3.8          1.5         0.3      Iris-setosa
1          6.9         3.1          5.1         2.3   Iris-virginica
2          5.1         3.5          1.4         0.3      Iris-setosa
3          5.9         3.0          4.2         1.5  Iris-versicolor
4          6.0         2.9          4.5         1.5  Iris-versicolor
5          5.0         3.5          1.3         0.3      Iris-setosa
6          5.5         2.4          3.8         1.1  Iris-versicolor
7          6.9         3.2          5.7         2.3   Iris-virginica
8          4.4         3.0          1.3         0.2      Iris-setosa
9          5.8         2.7          5.1         1.9   Iris-virginica

>>> df = df.select(['Name', 'SepalLength', 'PetalLength'])
>>> df

              Name  SepalLength  PetalLength
0  Iris-versicolor          6.0          4.5
1  Iris-versicolor          5.5          3.8
2   Iris-virginica          6.9          5.7
3      Iris-setosa          5.1          1.4
4      Iris-setosa          5.1          1.5
5   Iris-virginica          5.8          5.1
6   Iris-virginica          6.9          5.1
7      Iris-setosa          5.1          1.4
8   Iris-virginica          7.7          6.7
9      Iris-setosa          5.0          1.3

>>> df = df[(df.Name == 'Iris-setosa') & (df.PetalLength > 1.5)]
>>> df

          Name  SepalLength  PetalLength
0  Iris-setosa          4.8          1.9
1  Iris-setosa          5.4          1.7
2  Iris-setosa          5.7          1.7
3  Iris-setosa          5.0          1.6
4  Iris-setosa          5.1          1.9
5  Iris-setosa          4.8          1.6
6  Iris-setosa          4.7          1.6
7  Iris-setosa          5.1          1.6
8  Iris-setosa          5.1          1.7
9  Iris-setosa          4.8          1.6DocumentationGeneral product information, including installation instructions, is available in theTeradata Documentation websiteLicenseUse of the Teradata Python Package is governed by theLicense Agreement for the Teradata Python Package for Advanced Analytics.
After installation, theLICENSEandLICENSE-3RD-PARTYfiles are located in theteradatamldirectory of the Python installation directory.