1
0
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:
sshehata 2022-12-18 03:21:01 +01:00
parent a8b69c276c
commit 0f33e2fa72

View File

@ -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++