CodingTrain / CodingTrain/Suggestion-Box
8.15 drag and drop csv to extract table
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 570
- Forks
- 85
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par reproduire le comportement signalé de loadTable en utilisant l’exemple de dropzone du tutoriel 8.15, l’exemple de table de 13.5 et le code gotFile fourni. Comparez l’objet p5.Table et le chemin de chargement CSV ; le travail est terminé lorsque la cause de l’issue est confirmée et qu’un correctif documenté existe.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- data, web-dev
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100