Aggregate Functions | SQLAlchemy | teradataml - Aggregate Functions - Teradata Package for Python

Teradata® Package for Python User Guide

Product
Teradata Package for Python
Release Number
17.00
Published
November 2021
Language
English (United States)
Last Update
2022-01-14
dita:mapPath
bol1585763678431.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
B700-4006
lifecycle
previous
Product Category
Teradata Vantage
Examples for all aggregate functions can be found at: <pkg_install_location>\teradataml\data\notebooks\sqlalchemy\Teradata Vantage Aggregate Functions using SQLAlchemy.ipynb.

Supported functions

S/N Function Name Description
1 Avg / Average / Ave Returns the arithmetic average of all values in value_expression.
2 Corr Returns the Sample Pearson product moment correlation coefficient of its arguments for all non-null data point pairs.
3 Count Returns a column value that is the total number of qualified rows in value_expression.
4 Covar_pop Returns the population covariance of its arguments for all non-null data point pairs.
5 Covar_samp Returns the sample covariance of its arguments for all non-null data point pairs.
6 Kurtosis Returns the kurtosis of the distribution of value_expression.
7 max / maximum Returns a column value that is the maximum value for value_expression.
8 min / minimum Returns a column value that is the minimum value for value_expression.
9 REGR_AVGX Returns the mean of the independent_variable_expression for all non-null data pairs of the dependent and independent variable arguments.
10 REGR_AVGY Returns the mean of the dependent_variable_expression for all non-null data pairs of the dependent and independent variable arguments.
11 REGR_Count Returns the count of all non-null data pairs of the dependent and independent variable arguments.
12 REGR_Intercept Returns the intercept of the univariate linear regression line through all non-null data pairs of the dependent and independent variable arguments.
13 REGR_R2 Returns the coefficient of determination for all non-null data pairs of the dependent and independent variable arguments.
14 REGR_SLOPE Returns the slope of the univariate linear regression line through all non-null data pairs of the dependent and independent variable arguments.
15 REGR_SXX Returns the sum of the squares of the independent_variable_expression for all non-null data pairs of the dependent and independent variable arguments.
16 REGR_SXY Returns the sum of the products of the independent_variable_expression and the dependent_variable_expression for all non-null data pairs of the dependent and independent variable arguments.
17 REGR_SYY Returns the sum of the squares of the dependent_variable_expression for all non-null data pairs of the dependent and independent variable arguments.
18 Skew Returns the skewness of the distribution of value_expression.
19 stddev_pop Returns the population standard deviation for the non-null data points in value_expression.
20 stddev_samp Returns the sample standard deviation for the non-null data points in value_expression.
21 sum Returns a column value that is the arithmetic sum of value_expression.
22 var_pop Returns the population variance for the data points in value_expression.
23 var_samp Returns the sample variance for the data points in value_expression.
Grouping of columns is not allowed with DataFrame.assign() in teradataml 17.00.00.00. Always use 'drop_column = True' in DataFrame.assign().

Unsupported functions

  • grouping
  • pivot
  • unpivot