A O(n log n) NA-friendly time series "as of" using array operations

1 · Wes McKinney · May 4, 2012, 7 a.m.
In time series data, it's fairly common to need to compute the last known value "as of" a particular date. However, missing data is the norm, so it's a touch more complicated than doing a simple binary search. Here is an implementation using array operations that takes these things into …...