A missing value is an undefined or unusable data value. In numerical data, NaN can represent an undefined result or a value that does not apply to an observation. section 6.2.2
Handling missing values is part of data wrangling: inspect their presence, determine what the value means, and prepare the data before modeling or analysis. section 6.2.2 section 7.2.2
A practical workflow includes:
- Inspect non-null counts and data types with pandas DataFrame.info(). section 7.2.2
- Interpret whether NaN means an undefined result, an inapplicable observation, or a value requiring correction. section 6.2.2
- Replace missing values only when the domain meaning supports a specific replacement. section 6.2.2
Replacing missing yards gained
For fourth-down run and pass plays, NaN in YARDS_GAINED represents plays that gained no yards, so pandas can replace it with zero: nfl_pbp['YARDS_GAINED'] = nfl_pbp['YARDS_GAINED'].fillna(0). section 6.2.2


































