From 8d9f5bf852d1937ae75842b5dc91b0be6a12d490 Mon Sep 17 00:00:00 2001 From: Barbara Bertozzi Date: Wed, 19 Nov 2025 15:43:58 +0100 Subject: [PATCH] Int are now inferred as float to handle potential NA values --- scripts/sp2xr_generate_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sp2xr_generate_config.py b/scripts/sp2xr_generate_config.py index 3c37fcb..8782a13 100644 --- a/scripts/sp2xr_generate_config.py +++ b/scripts/sp2xr_generate_config.py @@ -19,7 +19,7 @@ from typing import Any def infer_general_dtype(dtype: Any) -> str: """Infer general data type from pandas dtype.""" if pd.api.types.is_integer_dtype(dtype): - return "int" + return "float" # Use float to handle potential NA values elif pd.api.types.is_float_dtype(dtype): return "float" elif pd.api.types.is_datetime64_any_dtype(dtype):