Deedle(F#):System.Exception:由于先前的错误

时间:2017-04-24 13:36:08

标签: dataframe f# deedle

(编辑)我在MacOS Sierra和Deedle 1.2.5上使用F#interactive与FsLab一起使用Xamarin 6.3 -

我正在尝试从http://bluemountaincapital.github.io/Deedle/frame.html

获取此代码

这会产生错误。

type Person = 
  { Name:string; Age:int; Countries:string list; }

let peopleRecds = 
  [ { Name = "Joe"; Age = 51; Countries = [ "UK"; "US"; "UK"] }
    { Name = "Tomas"; Age = 28; Countries = [ "CZ"; "UK"; "US"; "CZ" ] }
    { Name = "Eve"; Age = 2; Countries = [ "FR" ] }
    { Name = "Suzanne"; Age = 15; Countries = [ "US" ] } ]

// Turn the list of records into data frame 
let peopleList = Frame.ofRecords peopleRecds
// Use the 'Name' column as a key (of type string)
let people = peopleList |> Frame.indexRowsString "Name"

people?Age;;
 val it : Series<string,float> =
 Joe     -> 51 
 Tomas   -> 28 
 Eve     -> 2  
 Suzanne -> 15 

people.Columns?Age.TryAs<string>();;
  

由于错误System.Exception而停止:操作无法执行   由于早期错误而完成查找不确定类型的对象   基于此计划点之前的信息。类型注释   可能是

0 个答案:

没有答案