Idea for pandas.Index.nearest() method #7223
Labels
Algos
Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
Datetime
Datetime data dtype
Duplicate Report
Duplicate issue or pull request
Enhancement
For an ordered index, there is a pandas.Index.asof() method that returns the most recent label to the label that's passed to it. However, in some cases it's useful to have a method that returns the nearest label to the label that is passed to it. For example:
Thoughts?
The text was updated successfully, but these errors were encountered: