Section 1 - Instruction

After checking your data's size with .shape, the next step is to understand its contents. Are the columns holding numbers, text, or dates? Knowing the data type for each column is crucial before you can perform any analysis.

Engagement Message

Why is it important to know if a column contains numbers versus text?

Section 2 - Instruction

Pandas gives us a powerful method for this: .info(). Unlike .shape (a property), .info() is an action, so we call it with parentheses: df.info(). This command prints a concise summary of your DataFrame.

Engagement Message

What does it mean that .info() is an 'action' rather than just a property?

Section 3 - Instruction

Here's what the output looks like:

Engagement Message

What information can you immediately spot from this output?

Section 4 - Instruction

The output from df.info() first lists every column by name. In our example, you can see the three columns: name, , and . This is a great way to see all your features at once, especially if your dataset has many columns.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal