We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7010a7 commit ab4e851Copy full SHA for ab4e851
pandas/core/base.py
@@ -20,6 +20,7 @@
20
21
import numpy as np
22
23
+import pandas as pd
24
from pandas._libs import lib
25
from pandas._typing import (
26
Axis,
@@ -1270,6 +1271,13 @@ def searchsorted(
1270
1271
sorter: NumpySorter = None,
1272
) -> npt.NDArray[np.intp] | np.intp:
1273
1274
+ if isinstance(value, pd.DataFrame):
1275
+ msg = (
1276
+ "Value must be array-like or scalar, "
1277
+ f"{type(value).__name__} is not supported"
1278
+ )
1279
+ raise ValueError(msg)
1280
+
1281
values = self._values
1282
if not isinstance(values, np.ndarray):
1283
# Going through EA.searchsorted directly improves performance GH#38083
0 commit comments