Open evanmcclure opened 4 years ago
I believe the fix should happen within series.Float(), perhaps using another version of series.Float() lets the user exclude NaN values, before the slice ever gets passed to gonum. I believe the other statistical functions in Series should also have the same behavior. That is, exclude NaN values in the series.
I'll clone and submit a PR for this change. Then, you can let me know if you think this is worthwhile.
I'll clone and submit a PR for this change. Then, you can let me know if you think this is worthwhile.
has this pr merged to master branch?
@dalizitajiu same question
I was exploring a dataset and discovered that when any element in a Series of floats is NaN, the function called
series.Mean()
invalidates the entire series and returns NaN. I expectedseries.Mean()
to exclude values with NaN when computing the mean.