mirror of
https://github.com/sjwhitworth/golearn.git
synced 2025-04-25 13:48:49 +08:00
Merge pull request #284 from sshehata/master
feat: allow missing values when parsing csvs
This commit is contained in:
commit
74ae077eaf
@ -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