CodingTrain / CodingTrain/Suggestion-Box
8.15 drag and drop csv to extract table
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 570
- Forks
- 85
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi Daniel,
I've been watching your p5.js tutorial series. It's excellent. Thank you!
I'm trying to combine the dropzone you demonstrate in 8.15 with the tabular data functionality shown in 13.5. I'm stuck so I came here to see if anyone else is having the same issue. I can't find any threads with the same question though.
I am having a problem as the table I get from the file is showing an empty array in the console:
_p5.Table {columns: Array(0), rows: Array(0)}
columns
:
(2) ["Destination", "Price"]
rows
:
(2421) [p5.TableRow, p5.TableRow …]
__proto__
:
Object_
_undefined_
This means I cannot access the data. Everything just returns undefined. How can I fix this so that the array shows {columns: Array(2), rows: Array(2421)} as expected?
My code:
function gotFile(myfile){
vox2 = loadTable(myfile.data,"csv", "header");
console.log(vox2);
console.log(vox2[0]);
}
Any help you can offer would be very much appreciated.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, das gemeldete Verhalten von loadTable anhand des Dropzone-Beispiels aus Tutorial 8.15, des Tabellenbeispiels aus 13.5 und des bereitgestellten gotFile-Codes zu reproduzieren. Vergleiche das p5.Table-Objekt und den CSV-Ladepfad; abgeschlossen ist die Untersuchung, wenn die Ursache des Issues bestätigt und eine dokumentierte Lösung vorhanden ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data, web-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100