Click here to Skip to main content
14,696,398 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is a continuation of a previous question How to filter a dataframe?[^] I got the filtering working but I am having trouble saving the filtered content into it's own dataframe.
I have a column height and the value is either t - tall or s - short.

What I have tried:

DataFrame<object> shortAndTall = DataFrame.readCsv(myDataFile);
shortAndTall.select((Predicate<object>) new Predicate<object>() {
@Override
public Boolean apply(List<object> record) {
String height = (String) record.get(2); //this gets the 3rd column which is height
// System.out.println(height);
return Fall_ADL.equals("t");
}})
now I'm trying to figure out how to save all the tall rows and their corresponding columns into it's own dataframe and then I could do the same for the short content.

Thanks so much!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900