pandas.DataFrame.info
pandas 3.1.1 · DataFrame · method
Print a DataFrame summary with its index, column types, non-null counts and memory use.
Call syntax
DataFrame.info(verbose=None, buf=None, max_cols=None, memory_usage=None, show_counts=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
verbose |
Optional Positional or keyword Default None |
bool Set True for the full column report or False for the compact report. With None, pandas uses the column-count threshold. |
buf |
Optional Positional or keyword Default None |
writable buffer Pass a writable buffer such as StringIO to capture the report as text. With None, it prints to standard output. |
max_cols |
Optional Positional or keyword Default None |
int When verbose is None, pandas uses the compact report if the DataFrame has more columns than this threshold. |
memory_usage |
Optional Positional or keyword Default None |
True, False, or "deep" True shows memory use, False hides it, and "deep" requests a more detailed measurement. None follows the pandas display setting. |
show_counts |
Optional Positional or keyword Default None |
bool True shows the non-null count for each column in the full report. False hides those counts. With None, pandas checks its row and column display limits. |
Returns
Prints the summary and returns None. To use the report as text, pass a writable buffer as buf.