From 931b2a69df98a0426a70027854e20541d2874cb9 Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Tue, 27 Jun 2017 10:54:57 +0100 Subject: [PATCH] Added example for converting sqlite data into a Frame. --- example.fsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/example.fsx b/example.fsx index 3d8dbdf..2de6b12 100644 --- a/example.fsx +++ b/example.fsx @@ -60,3 +60,18 @@ let ExtIds = ["aaagbdompnfgjaokopkpaceijcapjdde" |> Chart.WithOptions (Options(legend=Legend(position="bottom"))) |> Chart.WithLabels ExtIds + +let permissionFrame = Ctx.Main.Crx |> Frame.ofRecords + +permissionFrame.Print true |> ignore + +let extData = + query {for x in Ctx.Main.Extension do + select (x.Date, x.Name, x.Downloads) } + |> Seq.filter (fun (date, name, download) -> date.IsSome && name.IsSome && download.IsSome) + |> Seq.map (fun (date, name, download) -> (System.DateTime.Parse(date.Value), name.Value, + download.Value)) + |> Frame.ofRecords + |> Frame.indexColsWith ["Date"; "Name"; "Downloads"] + +