October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

A Fast First Look at a Pandas DataFrame: 3 Methods Beyond .describe()

A practical first-pass pandas workflow: inspect structure with info(), group columns with select_dtypes(), and check values and combinations with value_counts().
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a quick first pass on an unfamiliar pandas DataFrame, use df.info() to inspect its structure, select_dtypes() to group columns by the types pandas sees, and value_counts() to find common or unusual values. Each answers a different question that a default describe() summary may not make as visible.

What can you learn from a quick EDA pass?

Exploratory data analysis (EDA) begins by checking what a table contains before drawing conclusions from it. These methods provide three complementary clues:

As an Amazon Associate I earn from qualifying purchases.

  • info(): How many rows and columns are there, what are the column types, and how many values are non-null?
  • select_dtypes(): Which columns does pandas currently classify as numeric, textual, or categorical?
  • value_counts(): Which individual values or combinations occur most often?

They are diagnostic starting points, not a full data-quality audit. A type can be technically valid but semantically wrong, and a frequent value is not automatically correct.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Use df.info() to inspect structure and missingness

DataFrame.info() prints a concise summary of a DataFrame, including its index and columns, non-null counts, dtypes, and memory information. It is a useful first check for questions such as whether a column has missing entries or whether an expected numeric field appears to have a text dtype. See the pandas DataFrame.info() reference.

df.info()

Read the non-null counts alongside the row count to spot columns with missing values. Treat the output as an overview: its exact display can vary with the method’s arguments and pandas display options, and it does not explain why values are missing or whether missingness is acceptable for your analysis.

2. Use select_dtypes() to group columns by type

select_dtypes(include=..., exclude=...) returns a DataFrame containing columns whose dtypes match the types you specify. That lets you focus later checks on numeric columns or on columns commonly used for categorical review. The method reports pandas’ current dtype assignments; it cannot tell whether those assignments match the meaning of the data. See the pandas select_dtypes() reference.

# Count columns by the dtype pandas currently sees
df.dtypes.value_counts()

# Separate columns for focused inspection
numeric = df.select_dtypes(include="number")
textual = df.select_dtypes(include=["object", "string", "category"])

For example, a column of digits stored as text will not be included in numeric. That may be intentional—an identifier is often better treated as a label than a quantity—or it may signal that the data needs cleaning or conversion. Check the field’s meaning before changing its type. The pandas user guide also documents counting dtypes with df.dtypes.value_counts(); see pandas’ introductory guide to essential functionality.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Use value_counts() to check frequencies

On a Series, value_counts() computes frequencies for the values in that one-dimensional column. It can reveal dominant categories, rare entries, and values that merit checking against expectations. If missing values matter to the review, set dropna=False explicitly.

# Replace "status" with a categorical column in your DataFrame
df["status"].value_counts(dropna=False)

For combinations across columns, call DataFrame.value_counts() and name the columns with subset:

# Replace these names with columns in your DataFrame
df.value_counts(subset=["status", "region"], dropna=False)

The pandas user guide describes Series value_counts() as computing a histogram of a one-dimensional array and documents the DataFrame method for joint frequencies. See the pandas user guide. A high-cardinality column can produce a long result, and frequency alone cannot explain why a value appears or whether it is erroneous.

Rank #4
Sale
Pandas Journal (Diary, Notebook)
  • Crisp writing pages are perfect for personal reflections, sketching, or for recording favorite quotations or poems.
  • Premium 120 gsm paper takes pen or pencil beautifully.
  • Paper is acid free and of archival quality.
  • Light gray lines subtly guide your writing.
  • An inside back cover pocket expands to hold notes, cards, mementos, and more.

How these methods complement describe()

describe() remains useful for summary statistics. On a mixed-type DataFrame, its default behavior is dtype-dependent: it describes numeric columns, or categorical columns if there are no numeric columns. Its include and exclude arguments let you control which types are summarized. The three methods here address different first-pass questions—table structure, dtype composition, and value frequency—rather than replacing describe(). The behavior is documented in the pandas user guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

A compact first-pass workflow

Run the checks in sequence, replacing the example column names with ones in your own DataFrame:

Best Value
Pandas Funny GIS/Programming/Python T-Shirt, Men, Black, Small
  • Funny design. Import pandas as pd, an all too familiar python code.
  • Featuring a familiar python code, this will get a laugh from all the nearby programmers and GIS professionals.
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem
  1. Check the table’s shape and null counts: run df.info().
  2. See the dtype mix: run df.dtypes.value_counts(), then use select_dtypes() to isolate columns for focused checks.
  3. Inspect frequencies: run Series value_counts() on relevant categorical columns, then DataFrame value_counts(subset=...) when combinations matter.

Use what you find to decide what to validate next: compare types with field meaning, investigate unexpected or missing values, and account for how the data was collected before relying on it downstream.

Quick Recap

SaleBestseller No. 4
Pandas Journal (Diary, Notebook)
Pandas Journal (Diary, Notebook)
Premium 120 gsm paper takes pen or pencil beautifully.; Paper is acid free and of archival quality.
$10.99
Bestseller No. 5
Pandas Funny GIS/Programming/Python T-Shirt, Men, Black, Small
Pandas Funny GIS/Programming/Python T-Shirt, Men, Black, Small
Funny design. Import pandas as pd, an all too familiar python code.; Lightweight, Classic fit, Double-needle sleeve and bottom hem
$19.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.