View source: R/pre_processing.R
| na_to_nan | R Documentation |
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.
na_to_nan(df)
df |
Data frame, or object coercible to one. |
Data frame with NA values replaced with NaN values.
na_to_nan(data.frame(a = c(1,NA,0,0,NA,NA)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.