Skip to main content
Albero Academy

Inspecting Data

The first five commands you run on any new dataset.

Foundations8 min

Before analysing anything, you look. These commands are the first things you run on every new DataFrame — they reveal the shape, the types, the missing values and the distribution of each column.

The first look

CommandTells you
df.head()First 5 rows (tail() for the last)
df.shape(rows, columns)
df.info()Columns, non-null counts, dtypes
df.describe()Summary stats for numeric columns
df["col"].value_counts()Frequency of each value
run these on every dataset
df.head()
df.info() # ← always run this first
df.describe()
df["programme"].value_counts()
df.isna().sum() # missing values per column

Start with info()

Key takeaways

  1. 01head/shape/info/describe/value_counts are the standard first look at any DataFrame.
  2. 02df.info() reveals dtypes and non-null counts — run it first.
  3. 03df.describe() summarises numeric columns; value_counts() shows category frequencies.
  4. 04df.isna().sum() counts missing values per column.

Finished this chapter?

Mark it complete to track your progress through Pandas.