How to display Deedle DataFrame as a good table in FSI?

Reading an article Analyzing and Visualizing Data with F#( https://www.oreilly.com/ideas/analyzing-and-visualizing-data-with-f-sharp/page/2/analyzing-data-using-f-and-deedle ) I collected (maybe wrong) that you could display the contents Deedle DataFramein FSharp Interactive( FSI) as a good table.

The text fragment that made me think like this:

When you create a data frame, F# Interactive formats it nicely so you can get a quick idea about the data. For example, in Table 2-1 you can see the ranges of the values and which values are frequently missing.

These lines were preceded by a good table showing the contents DataFrame.

Without installation and opening FSLab, as recommended in the article, when I can create DataFramein FSI, then enter its name and ";;" I get something like this:

> df;;
val it : Frame<int,string> =
  Deedle.Frame`2[System.Int32,System.String]
    {ColumnCount = 2;
     ColumnIndex = Deedle.Indices.Linear.LinearIndex`1[System.String];
     ColumnKeys = seq ["A"; "B"];
     ColumnTypes = seq [System.Int32; System.Int32];
     Columns = series [ A => series [ 0 => 1; 1 => 2; 2 => 3; 3 => 4; 4 => 5;  ... ; 9 => 10]; B => series [ 0 => 11; 1 => 12; 2 => 13; 3 => 14; 4 => 15;  ... ; 9 => 20]];
     ColumnsDense = series [ A => series [ 0 => 1; 1 => 2; 2 => 3; 3 => 4; 4 => 5;  ... ; 9 => 10]; B => series [ 0 => 11; 1 => 12; 2 => 13; 3 => 14; 4 => 15;  ... ; 9 => 20]];
     IsEmpty = false;
     Item = ?;
     Item = ?;
     RowCount = 10;
     RowIndex = Deedle.Indices.Linear.LinearIndex`1[System.Int32];
     RowKeys = seq [0; 1; 2; 3; ...];
     Rows = series [ 0 => series [ A => 1; B => 11]; 1 => series [ A => 2; B => 12]; 2 => series [ A => 3; B => 13]; 3 => series [ A => 4; B => 14]; 4 => series [ A => 5; B => 15];  ... ; 9 => series [ A => 10; B => 20]];
     RowsDense = series [ 0 => series [ A => 1; B => 11]; 1 => series [ A => 2; B => 12]; 2 => series [ A => 3; B => 13]; 3 => series [ A => 4; B => 14]; 4 => series [ A => 5; B => 15];  ... ; 9 => series [ A => 10; B => 20]];}

, FSLab, , , , . , :

Severity    Code    Description Project File    Line    Suppression State
Error       Unable to resolve dependencies. 'FSharp.Data 2.4.6' is not compatible with 'FsLab 1.0.2 constraint: FSharp.Data (= 2.3.2)'.         0   

, .

,

1) , , Deedle DataFrame FSI ( , , RStudio R)?

2) , , , , ?

+4
1

F # Interactive , Deedle, Deedle.fsx load script, :

#load "packages/Deedle/Deedle.fsx"
open Deedle

let df = 
  [ "First" => Series.ofValues [1;2;3;4]
    "Second" => Series.ofValues [1;2;3;4] ]
  |> frame

Deedle Paket , . , :

df.Print()
+5

Source: https://habr.com/ru/post/1695579/


All Articles