Closed denghejun closed 3 years ago
In case others come across this question, this is how I accomplished it in my project:
Created a function to return the filter function for only NaNs:
func IsNaNFilter() func() func(el series.Element) bool {
isNaNFunction := func() func(el series.Element) bool {
return func(el series.Element) bool {
return el.IsNA()
}
}
return isNaNFunction
}
Then whenever I need to filter to only rows that the value is NaN, I do this:
isNaN := IsNaNFilter()
out = out.Filter(dataframe.F{
Colname: "ColName",
Comparator: series.CompFunc,
Comparando: isNaN()})
How to filter out NaN rows?