Deedle icon indicating copy to clipboard operation
Deedle copied to clipboard

Throw exception when doing e.g. Lookup.Smaller on unsorted frame

Open tpetricek opened this issue 10 years ago • 1 comments

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 where offset is the offset of key, but this would only work when the key actually exists in the frame, so I think the first option makes more sense.

tpetricek avatar May 24 '14 12:05 tpetricek

I agree.

hmansell avatar May 24 '14 14:05 hmansell