info() Method | Teradata Python Package - 17.00 - info() Method - Teradata Package for Python

Teradata® Package for Python User Guide

Teradata Package for Python
Release Number
November 2021
Last Update
Content Type
User Guide
Publication ID
English (United States)

The info() function prints a summary of the DataFrame.

Optional arguments:
  • verbose specifies whether to print full summary or short summary.
    • If set to True, prints full summary.
    • If set to False, prints short summary.
  • buf specifies the writable buffer to send the output to.

    By default, the output is sent to sys.stdout.

  • max_cols specifies the maximum number of columns allowed for printing the full summary.
  • null_counts specifies whether to show the non-null counts. Display the counts if null_counts is True, otherwise do not display the non-null counts.

Example 1: Print information on DataFrame

This example prints information for DataFrame "sales".
>>> df = DataFrame("sales")

<class 'teradataml.dataframe.dataframe.DataFrame'>
Data columns (total 6 columns):
accounts              str
Feb                 float
Jan                   int
Mar                   int
Apr                   int
dtypes: str(1), float(1), int(3),

Example 2: Print a count of non-null values

This example set null_counts to True for a count of non-null values.
<class 'teradataml.dataframe.dataframe.DataFrame'>
Data columns (total 6 columns):
accounts    6 non-null str
Feb         6 non-null float
Jan         4 non-null int
Mar         4 non-null int
Apr         4 non-null int
datetime    6 non-null
dtypes: str(1), float(1), int(3),

Example 3: Print a short summary

This example set verbose to False for a short summary.
<class 'teradataml.dataframe.dataframe.DataFrame'>
Data columns (total 6 columns):
dtypes: str(1), float(1), int(3),