vega / datalib

JavaScript data utility library.
http://vega.github.io/datalib/
BSD 3-Clause "New" or "Revised" License
731 stars 133 forks source link

Selecting all rows of a data-frame where a given column is equal to a given value #103

Closed Mawandaian closed 4 years ago

Mawandaian commented 4 years ago

I want to select all rows where a column is equal to a given value, eg where sex = 'male', but I have failed to find the datalib function to help me do it.

jheer commented 4 years ago

Datalib "tables" are simply arrays of JavaScript objects. So you can use standard array methods, such as filter or find.