You can use the Frame.filterRows
function:
df |> Frame.filterRows (fun k row ->
row?two >= 5.0 && row?four <= 11.0)
Having something like the pandas slicing syntax would be nice, but we have not found entirely smooth way of doing that yet, so using filter function is the current way of doing that (but the good thing is that this is consistent with other filter operations - for lists and sequences).
Here, I'm using row?two
which is a simplified notation for getting numeric (floating point) values from a data frame, but you could use GetAs<T>("two")
for values of non-numeric types.
Just for a reference, here is my sample data set:
let df =
Frame.ofRows
[ 'a' => Series.ofValues [ 0;1;2;3]
'b' => Series.ofValues [ 4;5;6;7]
'c' => Series.ofValues [ 8;9;10;11]
'd' => Series.ofValues [ 12;13;14;15] ]
|> Frame.indexColsWith ["one"; "two"; "three"; "four"]