I have a specific column and I want to extract the subsequent column in the dataset.
nhood,column,variablecolumn
Treasure Island,3,5
McLaren Park,1,2
Tenderloin,28,112
Lakeshore,14,8
Chinatown,15,103
Although I know the name of the second column, the name of the third column varies in my dataset.
I experimented with different approaches to achieve this. My goal is to retrieve the value "5" from the first row.
parseFloat(data[1]["column"+1]);
parseFloat(data[1]["column"]+1);
Another strategy involves creating an array with column names, identifying the index for "column", and then using index + 1
when extracting data using that command.