I wonder if it is at all possible when importing a csv
file to have the ability to add an index value? or am I missing something ā¦
When I import a csv
in Observable I get an Array of objects, I then slice and filter the data in different ways, but when filtering I would like to keep a record of the index so I can flag the rows in the original dataset, hope that makes sense.
For example, one of my filters goes like this:
{
const byAddress = d => d['Address1']
const arrs = [data.map(byAddress), uniques.map(byAddress)];
return arrs.reduce((a, b) => a.filter(c => !b.includes(c)));
}
and it gives an Array with the filtered data Iām looking for but I would like to know the index of each row so I can correlate to the original data.