float64 is a 64-bit floating-point dtype used for pandas columns that contain decimal values or NaN. Pandas may change an integer column to float64 when NaN must be represented. section 2.10
In practical pandas work, float64 affects both missing-data handling and numerical precision:
- Accommodates NaN in a column that previously held integers, without silently truncating assigned decimal values. section 2.10
- Can expose small floating-point arithmetic differences, such as 290.00999999999993 versus 290.0100000000001. section 6.2
- Uses less memory than 128-bit floats, while offering less precision for calculations that require extreme numerical accuracy. section 6.2
Missing sales values
After concatenating new products, the sales column contains NaN values. Evaluating df.loc[[5,6,7], 'sales'] returns a Series whose dtype is float64. Assigning [100, 200, 75] through the same selection fills the values while the column remains floating-point. section 2.10
5 NaN 6 NaN 7 NaN Name: sales, dtype: float64
Inspect the returned Series to see how missing values are represented and how pandas reports its float64 dtype. section 2.10






