liveBook · Manning

Nan

A special floating-point value representing an undefined, invalid, or unrepresentable numerical result.

How 9 Manning books explain it

Pandas Workout: 200 exercises to make you a stronger data analyst

NaN is a floating-point marker representing a missing or undefined numeric value in pandas and NumPy.

How it is used
Handles incomplete observations during pandas cleaning, counting, filtering, replacement, and interpolation.
How deep it goes
Defines NaN’s float behavior and works through counting, dropping, filling, interpolation, and dtype conversion without floating-point internals.
Examples
Uses product sales gaps, taxi records, parking violations, temperature outages, string extraction, and survey responses.
What you can do after
Apply it via pandas to count, remove, replace, interpolate, and type-convert missing data deliberately.

Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains nan →

Rust in Action: Systems programming concepts and techniques

Not a number is a floating-point special value representing an undefined or unrepresentable numeric result.

How it is used
Identifies undefined floating-point results before they spread through later calculations.
How deep it goes
Explains comparison and propagation behavior, then locates NaN among exponent-bit special cases without decoding its individual bit patterns.
Examples
Uses the square root of −42, division of 0 by 0, self-equality assertions, and an infinity check.
What you can do after
Diagnose/debug with it by checking suspect results using `is_nan()` or asserting `is_finite()` near a calculation.

Read how Rust in Action: Systems programming concepts and techniques explains nan →

Clojure: The Essential Reference

NaN is a floating-point value representing an undefined or unrepresentable numeric result and having special comparison behavior.

How it is used
Flags undefined floating-point results and exposes edge cases in numeric extrema, equality, comparison, and sorting.
How deep it goes
Defines the value and works through arithmetic and comparison results, without descending into its bit representation.
Examples
Shows undefined arithmetic yielding NaN, self-comparison returning false, extrema propagating NaN, and differing sort results.
What you can do after
Diagnose/debug with it when NaN changes an extrema calculation or makes comparison-based sorting unreliable.

Read how Clojure: The Essential Reference explains nan →

100 Java Mistakes and How to Avoid Them

NaN is a special floating-point value representing an undefined or unrepresentable numeric result and that is unequal to every value, including itself.

How it is used
Explains how Java floating-point comparisons and ordering fail when NaN values are ignored.
How deep it goes
Defines NaN, demonstrates comparison failures, and prescribes validation and library-based ordering without deriving floating-point internals.
Examples
Uses self-comparison, three-way branching, manual Comparable ordering, Double.compare, assertions, and NaN-rejecting constructors.
What you can do after
Diagnose NaN comparison bugs, validate inputs, and implement floating-point ordering with standard library methods.

Read how 100 Java Mistakes and How to Avoid Them explains nan →

Essential TypeScript 5, Third Edition

NaN is the special JavaScript numeric value representing an undefined or unrepresentable numerical result.

How it is used
Identifies failed numeric results when function arguments are omitted or do not match a function’s numeric assumption.
How deep it goes
Explains NaN through function outputs and shows ways to prevent or filter it, without examining numeric internals.
Examples
Uses price summation in index.js and tax calculation in index.ts to contrast valid numbers, concatenated strings, and NaN.
What you can do after
Diagnose/debug NaN results from missing or nonnumeric arguments and apply default values or conversion checks where appropriate.

Read how Essential TypeScript 5, Third Edition explains nan →

Statistics Every Programmer Needs

NaN is a special floating-point value representing a numerical result that is undefined or cannot be represented as a valid number.

How it is used
Cleans numerical play-by-play data before analysis or model fitting.
How deep it goes
Defines NaN, demonstrates contextual replacement, and warns that imputation can distort predictions.
Examples
Uses NFL play-by-play yards, timeouts, zero-yard plays, and pandas fillna(0).
What you can do after
Apply it via pandas by imputing NaN values when the domain justifies the replacement.

Read how Statistics Every Programmer Needs explains nan →

100 Go Mistakes and How to Avoid Them

NaN is the IEEE-754 floating-point value representing an undefined or unrepresentable numerical result.

How it is used
Diagnoses undefined or unrepresentable results in floating-point calculations and supplies a predicate for detecting them.
How deep it goes
Defines NaN, demonstrates its construction, and gives its IEEE-754 comparison property and math.IsNaN detection.
Examples
Uses zero-valued float64 division to produce positive infinity, negative infinity, and NaN.
What you can do after
Diagnose floating-point results with math.IsNaN and recognize why equality testing cannot identify NaN.

Read how 100 Go Mistakes and How to Avoid Them explains nan →

Machine Learning System Design

NaN is a floating-point value representing an undefined or unrepresentable numerical result.

How it is used
Uses NaN as a warning signal when interpreting loss curves and debugging unstable training.
How deep it goes
Explains diagnostic causes and practical remedies, but does not derive floating-point behavior or implementation details.
Examples
Illustrates NaN through loss explosions, division by zero, invalid logarithms, and NaNs already present in data.
What you can do after
Diagnose unstable training by checking gradients, numerical operations, learning rate, initialization, and preprocessing.

Read how Machine Learning System Design explains nan →

Grokking Machine Learning

NaN is a special marker representing a value that is missing, undefined, or not representable as a numeric value.

How it is used
Uses NaN detection to prepare messy tabular data before fitting machine-learning models.
How deep it goes
Defines NaN, counts missing entries, and demonstrates dropping columns or filling values, without discussing numeric representation internals.
Examples
Uses Titanic Cabin, Age, and Embarked columns to demonstrate inspection, removal, median filling, and categorical filling.
What you can do after
Diagnose missing entries with isna() and choose whether to drop a feature or replace its NaN values.

Read how Grokking Machine Learning explains nan →

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.