fslaborg / Deedle

Easy to use .NET library for data and time series manipulation and for scientific programming
http://fslab.org/Deedle/
BSD 2-Clause "Simplified" License
924 stars 196 forks source link

Fix aggregateRowsBy in Issue 375 #408

Closed zyzhu closed 5 years ago

zyzhu commented 5 years ago

Attempt to fix https://github.com/fslaborg/Deedle/issues/375

  1. Get all values of groupBy including missing values
  2. Added test
    
    sample:
     A         B C 
    1 -> 10        1 1 
    2 -> <missing> 2 2 
    3 -> 10        1 3 
    4 -> <missing> 2 4 
    5 -> 10        3 5

operation: sample |> Frame.aggregateRowsBy ["A";"B"] ["C"] Stats.mean

expected: A B C 0 -> 10 1 2 1 -> 2 3 2 -> 10 3 5