liveBook · Manning

Ordinal data

Ordinal data consists of categorical values with a meaningful order or rank, without necessarily having equal intervals between categories.

How 8 Manning books explain it

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

Categorical data whose values have a meaningful order or rank.

How it is used
Classifies ordered tabular columns so they receive treatment distinct from purely numeric measurements.
How deep it goes
Defines ordinal scales through rankings and unequal intervals, warning against mean and standard-deviation calculations.
Examples
Uses product stars, race placements, Likert responses, cylinder counts, and model years as ordered values.
What you can do after
Evaluate whether a tabular column represents ordered levels rather than a purely numeric measurement.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains ordinal data →

The Well-Grounded Data Analyst

Ordinal data consists of categorical values whose categories have a meaningful natural order.

How it is used
Frames ordered survey answers and discrete-value columns for categorical-data exploration and relationship analysis.
How deep it goes
Defines ordered categories, inspects numeric-looking columns, and applies rank-based tests while deferring broader categorical testing.
Examples
Uses clothing sizes, Likert responses, heart-disease test categories, and AI-tool trust ratings as examples.
What you can do after
Apply it via pandas and SciPy by ranking ordered responses, filtering invalid entries, and calculating Spearman’s correlation or Kendall’s tau.

Read how The Well-Grounded Data Analyst explains ordinal data →

Effective Data Analysis

Ordinal data consists of observations assigned to categories with a meaningful order but without necessarily equal spacing between categories.

How it is used
Uses ordered categories for exploratory features, group comparisons, and modeling decisions.
How deep it goes
Distinguishes ordinal from continuous data and lists rank-based tests, but stops short of detailed test calculations.
Examples
Uses month number, day of week, weekday indicators, rat-sighting boxplots, and date-derived feature columns.
What you can do after
Apply it via grouped distributions, cautious correlation use, and named non-parametric tests for ordinal comparisons.

Read how Effective Data Analysis explains ordinal data →

Starting Data Analytics with Generative AI and Python

An ordinal variable is a categorical variable whose values have a meaningful order but not necessarily equal intervals.

How it is used
Uses ordered review scores to investigate how product, transaction, shipping, and payment attributes relate to customer ratings.
How deep it goes
Defines ordinal review scores and demonstrates regression preparation, fitting, prediction, evaluation, coefficient inspection, and assumption checking.
Examples
Uses 1–5 review scores, merged product and order records, Python predictions, confusion matrices, and named feature coefficients.
What you can do after
Diagnose ordinal-score predictions with a fitted model, evaluation metrics, confusion matrices, and coefficient-to-feature mappings.

Read how Starting Data Analytics with Generative AI and Python explains ordinal data →

Ensemble Methods for Machine Learning

An ordinal feature is a categorical input variable whose categories have an inherent ordering.

How it is used
Guides categorical-feature encoding by distinguishing meaningful category order from unordered membership.
How deep it goes
Explains ordinal-versus-nominal intuition, numeric mappings, scikit-learn usage, and one-hot tradeoffs without covering model-specific effects.
Examples
Uses T-shirt sizes S–XL, colors, predicted cost, explicit category lists, and encoded feature matrices.
What you can do after
Apply ordinal and one-hot encoders while matching the representation to each feature’s category structure.

Read how Ensemble Methods for Machine Learning explains ordinal data →

Tiny Python Projects: Learn coding and testing with puzzles and games

An ordinal value is a representation that identifies the position of an item in an ordered sequence, such as first or second.

How it is used
Uses ordered labels to generate the day wording in a programmatic Twelve Days of Christmas verse.
How deep it goes
Explains list and dictionary representations, indexing adjustments, tests, and the distinction from Python's ord() function.
Examples
Demonstrates day names, verse generation, pytest assertions, ASCII character values, and character-range exploration.
What you can do after
Apply it via Python by mapping positions to labels, handling indexing, testing lookups, and converting characters with ord() and chr().

Read how Tiny Python Projects: Learn coding and testing with puzzles and games explains ordinal data →

D3.js in Action, Third Edition

An ordinal value is a categorical value whose labels have a meaningful order or rank.

How it is used
Guides data classification, visual encoding, and D3 scale selection for visualization projects.
How deep it goes
Defines ordered qualitative categories and connects them to palettes and scales, while deferring detailed scale treatment.
Examples
Uses T-shirt sizes and coffee-order sizes to demonstrate meaningful category order.
What you can do after
Apply ordinal classifications when organizing attributes and choosing visual encodings or D3 scales.

Read how D3.js in Action, Third Edition explains ordinal data →

Data Without Labels

Ordinal data consists of categories that have an inherent order but not necessarily meaningful numeric spacing.

How it is used
Classifies qualitative variables by distinguishing ordered categories from binary and nominal data.
How deep it goes
Defines ordinal data and contrasts it with nominal data, stopping before encoding, modeling, or statistical treatment.
Examples
Uses fast/medium/slow and positive/neutral/negative as examples of ordered categories.
What you can do after
Evaluate/understand whether categorical values possess an inherent order rather than merely distinct labels.

Read how Data Without Labels explains ordinal data →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.