anchor.diff:  byClassAndPort
   |> Frame.meanLevel Pair.get1And2Of3
   
  -byClassAndPort
  -|> Frame.sumLevel Pair.get1And2Of3
  -
   (**
   
   Look at survived column as booleans
  
positive.code: 
  let byClassAndPort1 = 
    titanic.GroupRowsBy<int>("Pclass").GroupRowsBy<string>("Embarked") 
    |> Frame.mapRowKeys Pair.flatten3
  
  let byClassAndPort = 
    titanic
  
negative.code: 
  *)
  
  let survivals = 
    survivedByClassAndPort 
    |> Series.applyLevel Pair.get1And2Of3 (fun sr -> 
        sr.Values |> Seq.countBy id |> series)
    |> Frame.ofRows
    |> Frame.indexColsWith ["Survived"; "Died"]
  (**
  
  Count total number of passangers in each group
  
  *)
  
  survivals?Total <- 
    byClassAndPort
    |> Frame.applyLevel Pair.get1And2Of3 Series.countKeys
  
  survivals
  
  let summary = 
    [ "Survived (%)" => survivals?Survived / survivals?Total * 100.0
      "Died (%)" => survivals?Died/ survivals?Total * 100.0 ] |> frame
  
  round summary
  
  summary |> Frame.meanLevel fst
  summary |> Frame.meanLevel snd
    