我有一个看起来像这样的数据框
Date Type last LastSize
12 -> 2013-10-25T00:00:00.575556Z trade 273 20
13 -> 2013-10-25T00:00:00.575556Z quote 0 0
: ... ... ... ...
26554 -> 2013-10-25T06:04:59.741493Z trade 273 2
26555 -> 2013-10-25T06:04:59.751844Z trade 273 8
我想根据标记为 的字段进行过滤Type
。具体来说,我想过滤数据框以仅包含列Type
包含字符串“trade”的行。
let tradesOnly = lastFrame.GetSeries<string>("Type")
|> Series.filterValues (fun t -> t.Contains "trade")
这将正确过滤,但只会给我正在使用的系列GetSeries
。Deedle 样本包括一个有点像这样的片段
let x = lastFrame.RowsDense
|> Series.filterValues (fun row -> row.GetAs<string>("Type") = "trade")
|> Series.countValues
这会编译但返回一个空数据框,因为我contains
不需要equals
。如何按字符串过滤帧包含?`