Pretty Printing in Deedle Data Frame

Viewed 324

I was wondering if there is a simple way to add pretty printing to a custom type used in a Deedle data frame.

In the following example:

open Deedle

type PrimaryContactInfo =
    | Default of int
    | NonDefault of int
    | Missing

type Account = { PrimaryContact : PrimaryContactInfo }

[ { PrimaryContact = Default(1) }; { PrimaryContact = Default(2) }; { PrimaryContact = NonDefault(5) } ]
|> Frame.ofRecords

I get the following output in fsi:

     PrimaryContact                         
0 -> FSI_0011+PrimaryContactInfo+Default    
1 -> FSI_0011+PrimaryContactInfo+Default    
2 -> FSI_0011+PrimaryContactInfo+NonDefault 

but I would rather have output like this:

     PrimaryContact                         
0 -> Default(1)    
1 -> Default(2)   
2 -> NonDefault(5)

Is this possible?

1 Answers
Related