1
0
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:
Richard Townsend 2022-12-28 16:30:02 +00:00 committed by GitHub
commit 74ae077eaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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