mirror of
https://github.com/sjwhitworth/golearn.git
synced 2025-04-25 13:48:49 +08:00
feat: allow missing values when parsing csvs
This commit is contained in:
parent
a8b69c276c
commit
0f33e2fa72
@ -187,6 +187,11 @@ func ParseCSVBuildInstancesFromReader(r io.ReadSeeker, attrs []Attribute, hasHea
|
||||
}
|
||||
}
|
||||
for i, v := range record {
|
||||
// support missing values
|
||||
if v == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
u.Set(specs[i], rowCounter, specs[i].attr.GetSysValFromString(strings.TrimSpace(v)))
|
||||
}
|
||||
rowCounter++
|
||||
|
Loading…
x
Reference in New Issue
Block a user