go-gota / gota

Gota: DataFrames and data wrangling in Go (Golang)
Other
2.98k stars 276 forks source link

Series.Mean() will return Expected value by ignoring NaN values. #131

Closed ghost closed 1 year ago

ghost commented 3 years ago

The users can use new method called NewSeries() to initialise Series with IsNaNToBeIgnore option to ignore NaN values for aggregate operations. For example NewFloats([]float64{1.0, 2.0, 3.0, math.NaN()}). The aggregate functions will ignore the 3rd index by default.