NaN Values in Series
Explore how pandas represents missing numeric data using NaN in Series. Understand its effect on data types and operations, and gain insight into working with nullable integer types and missing values in data analysis.
We'll cover the following...
We'll cover the following...
The NaN value
A value that may be familiar to NumPy users, but not Python users in general, is NaN. When pandas determines that a series holds numeric values but cannot find a number to represent an entry, it will use NaN. This value stands for “Not A Number” and is usually ignored in arithmetic operations. (Similar to NULL in SQL.)
Here’s a series that has NaN in it:
Note: One thing to note is that the type of this Series is
float64, notint64...