0
0
Data Analysis Pythondata~5 mins

info() for column types in Data Analysis Python

Choose your learning style9 modes available
Introduction

The info() function helps you quickly see the types of data in each column of a table. This is useful to understand what kind of data you have.

When you want to check if columns have numbers or words.
Before cleaning data, to find columns with missing values.
To understand the size and memory use of your data table.
When you want to confirm the data types after loading a file.
Syntax
Data Analysis Python
DataFrame.info(verbose=True, buf=None, max_cols=None, memory_usage=None, show_counts=None)

DataFrame is your table of data.

The info() method shows summary including column types.

Examples
Shows summary of all columns with their data types and counts.
Data Analysis Python
df.info()
Shows only summary without detailed column info.
Data Analysis Python
df.info(verbose=False)
Shows detailed memory usage of each column.
Data Analysis Python
df.info(memory_usage='deep')
Sample Program

This code creates a small table with names, ages, heights, and membership status. Then it prints the info summary showing column types.

Data Analysis Python
import pandas as pd

data = {
    'Name': ['Alice', 'Bob', 'Charlie'],
    'Age': [25, 30, 35],
    'Height': [5.5, 6.0, 5.8],
    'Member': [True, False, True]
}
df = pd.DataFrame(data)

print('DataFrame info:')
df.info()
OutputSuccess
Important Notes

The info() method is very fast and works on large data tables.

It helps spot missing data by showing non-null counts.

Column types like object usually mean text data.

Summary

info() shows column data types and counts.

Use it to understand your data quickly.

It helps find missing values and memory use.