Int are now inferred as float to handle potential NA values

This commit is contained in:
2025-11-19 15:43:58 +01:00
parent fc9cf7c861
commit 8d9f5bf852

View File

@@ -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):