Helper function to convert NA values in a data.frame to NaN. This ensures the correct conversion of missing values when reticulate converts R objects to their Python equivalent. See the reticulate package documentation on type conversions for more information.
Usage
na_to_nan(df)
Value
Data frame with NA values replaced with NaN values.