Search code examples
papaparse

PapaParse Errors explanation


I'm using papaParse to parse an CSV file into JSON for further use. Upon parsin it returns

"errors": [ { "type": "FieldMismatch", "code": "TooFewFields", "message": "Too few fields: expected 21 fields but parsed 1", "row": 14 } ], "meta": { "delimiter": ";", "linebreak": "\r\n", "aborted": false, "truncated": false, "fields": [ "Output in top 10 percentiles (%)", "Overall", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014" ] } }

can somebody please explain to me what this means? I read trough the documentation on their webpage but still don't understand what is wrong

the CSV file I'm working with is this (http://www.topdeckandwreck.com/excel%20graphs/Sheet10.csv)


Solution

  • In your config, add

    skipEmptyLines: true
    

    Reference: http://papaparse.com/docs#config-details