Hi I’m making an attempt to import a Numbers exported CSV file right into a DataFrame. The CSV has semicolon separators.
When i set the choices to:
let choices = CSVReadingOptions(hasHeaderRow: true, delimiter: ";")
do {
let body = attempt DataFrame(contentsOfCSVFile: url, choices: choices)
print(body)
} catch let error {
print("(error)")
}
The app hangs with out error on studying the choices (delimiter?). After I change the delimiter to a comma the app doesn’t cling however the knowledge is formatted mistaken: 1 column with all knowledge of the row, as an alternative of 4 columns.
━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃ Index;Age;12 months;Identify;;; ┃
┃ ┃ <String> ┃
┡━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 0 │ 1;44;1982;Jansen;;; │
│ 1 │ 2;66;1977;Piet;;; │
│ 2 │ 3;99;1952;Klaas;;; │
│ 3 │ 4;71;2020;Willem;;; │
└───┴────────────────────────┘
4 rows, 1 column
hint:
Thread 1 Queue : com.apple.main-thread (serial)
#0 0x00000001df418140 in ___lldb_unnamed_symbol1035 ()
#1 0x00000001df47ab00 in ___lldb_unnamed_symbol3177 ()
#2 0x00000001df47a760 in ___lldb_unnamed_symbol3176 ()
#3 0x00000001df47a16c in ___lldb_unnamed_symbol3174 ()
#4 0x0000000104b64454 in AppDelegate.software(_:open:choices:) at /Customers/kaasCoder/Paperwork/Documenten - MacBook Professional/Developer/ Dev-Apps/DataApp.4.1.9_1/DataApp/AppDelegate.swift:121
#5 0x0000000104b64dac in @objc AppDelegate.software(_:open:choices:) ()
Anybody have a thought tips on how to resolve this?
Thanks.