Open
Description
Is your feature request related to a problem?
Currently searchsorted
is supported for Series
and Index
objects, however I wish to be able to use it with DataFrame
objects as well.
Describe the solution you'd like
I'd like to be able to call DataFrame.searchsorted(value, side, sorter)
like in the case of Series.searchsorted
, but in this case the value
parameter would be a DataFrame
with the same number of columns as self
.
Additional context
For example:
import pandas as pd
df = pd.DataFrame({'a': [1, 3, 5, 7], 'b': [10, 12, 14, 16]})
value_df = pd.DataFrame({'a': [0, 2], 'b': [10, 11]})
df.searchsorted(value_df)
would return
array([0, 1])