count() in Regular Aggregate Mode - Teradata Python Package

Teradata® Python Package User Guide

Product
Teradata Python Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2020-02-29
dita:mapPath
rkb1531260709148.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-4006
lifecycle
previous
Product Category
Teradata Vantage

Use the count() method to return column-wise count of a DataFrame.

Example here is for count() as Regular Aggregate function. For count() as Time Series Aggregate, refer to count() in Time Series Aggregate Mode.

Example

>>> df = DataFrame("employee_info")
>>> df
                first_name marks   dob joined_date
    employee_no
    100               abcd  None  None        None
    101              abcde  None  None  1902-05-12
    112               None  None  None  2018-05-12
 
>>> df1 = df.select(['employee_no', 'first_name', 'marks'])

>>> df1.count()
      count_employee_no count_first_name count_marks
    0                 3                2           0