How can I retrieve the original rows' index after performing a query on the dataset?
I'am using JTablesaw as a Dataset library in Java, and I'm looking for a way to get the original rows' index after performing a query/filter on it.
E.g. considering this dataset:
A,B,C
10,5,3
4,7,2
6,9,1
and the below code
Table table = Table.read().file("data.csv");
Table result = table.where(rows -> rows.intColumn("A").isGreaterThanOrEqualTo(6));
With the result table being:
A,B,C
10,5,3
6,9,1
How can I get in output the orginal rows index? E.g.
[0,2]