Get top 10 values from column, using filter()?

Get top 10 values from column, using filter()?

veryacaveryaca Posts: 11Questions: 4Answers: 0

How can I use filter() to get the top 100 values of a column and include the value of another column in the result?
Say I want to get top 10 amounts, from largest to lowest. And for each largest amount, I want the value from another column as well.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @veryaca ,

    If you're using array based data, that'll be fairly easy. I used this SO thread to give this example here. It's sorting the data on the Age column, but all column data is available in the ordered dataset.

    Cheers,

    Colin

This discussion has been closed.