0
0
Pandasdata~5 mins

info() for column types and nulls in Pandas - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the info() method in pandas show about a DataFrame?
The info() method shows the number of rows, columns, data types of each column, and how many non-null values each column has.
Click to reveal answer
beginner
How can you tell if a column has missing values using info()?
If the number of non-null values is less than the total number of rows, it means the column has missing (null) values.
Click to reveal answer
beginner
What data types does info() display for DataFrame columns?
info() shows data types like int64, float64, object (for text), bool, and others.
Click to reveal answer
beginner
Why is it useful to check column types and null counts with info() before analysis?
It helps you understand your data structure, find missing data, and decide how to clean or prepare data for analysis.
Click to reveal answer
intermediate
What is the difference between info() and describe() in pandas?
info() shows data types and null counts, while describe() gives summary statistics like mean, min, max for numeric columns.
Click to reveal answer
What does the info() method NOT show about a DataFrame?
ANumber of non-null values per column
BData types of columns
CSummary statistics like mean and median
DTotal number of rows and columns
If a column has 100 rows but info() shows 90 non-null values, what does this mean?
AThe column has 10 missing values
BThe column has 10 extra values
CThe column is fully complete
DThe column has 90 missing values
Which data type shown by info() usually means text data?
Abool
Bfloat64
Cint64
Dobject
Why is it important to check for null values with info() before analysis?
ATo identify missing data that may affect results
BTo know the exact number of columns
CTo change data types automatically
DTo sort the DataFrame
What is the default output of df.info()?
AA DataFrame with summary statistics
BA printout showing index range, columns, non-null counts, and data types
CA list of column names only
DA plot of missing values
Explain how you can use info() to find columns with missing data in a DataFrame.
Look at the non-null count vs total rows for each column.
You got /3 concepts.
    Describe what information about column types and nulls you get from info() and why it matters.
    Think about how data types affect operations and how missing data can impact results.
    You got /3 concepts.