D3.csv output has false values

I'm using d3.csv to load a quite large dataset. The number of rows is not too big (500000), but the number of columns might be quite large (113). My current data is something like this:


What I'm trying to do is to filter the values and only get the columns that have a number. This is my function parseRows

function parseRows (data,i){
  //get values of columns
  var _values = Object.values(data);

  //filter values and return only the ones with numbers
  var filteredValues = _values.filter(function(d){return d!=="NA"});

  var _endValue = +filteredValues[filteredValues.length-1];

  return {
    startValue : +data.v1,
    endValue : _endIntersection,
    values : filteredIntersections


The code works perfectly until row 498544. From that moment on, the values that are loaded are not real, all of them are wrong. I've checked the dataset and they just don't exist in that csv. And if I console log _filteredValues,_endValue, etc. inside parseRows when the index is 498544 or 498545, etc. the values that are being parsed are the ones in the csv.

This dataset is being load through a queue function:

var queue = d3.queue()
   .defer(d3.csv, "data/othervalues.csv", parseOtherValues)
   .defer(d3.csv, "data/values/values_set_1.csv",parseRows)

And the problem is seen in dataloaded. Any idea why this might be happening? Is there a limit for d3.csv?

Row 498545 looks like this (with commas instead

"1337", "1112", "1337", "1226", "1248", "1272", "1297", "1322", "1344", "1359", "1380", "1405", "1432", "1454", "1481", "1507", "1534", "1581", "1614", "1641", "1665", "1688", "1707", "1726", "1749", "1773", "1653", "1502", "1417", "1336", "1247", "1188", "1166", "1004", "1025", "1048", "1064", "1088", "1112", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA"

Thank you