Deedle
Deedle copied to clipboard
Throw exception when doing e.g. Lookup.Smaller on unsorted frame
If I have an unordered series and I write:
frame.Rows |> Series.tryLookup key Lookup.Smaller
... then this always returns None
. I think there are two reasonable things to do:
- Throw an exception, because inexact lookup is only supported on ordered series
- In principle, this could just return the value at
offset - 1
whereoffset
is the offset ofkey
, but this would only work when thekey
actually exists in the frame, so I think the first option makes more sense.
I agree.