File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,8 @@ def _ensure_arraylike(values):
218218 """
219219 if not is_array_like (values ):
220220 inferred = lib .infer_dtype (values , skipna = False )
221- if inferred in ["mixed" , "string" ]:
221+ if inferred in ["mixed" , "string" , "mixed-integer" ]:
222+ # "mixed-integer" to ensure we do not cast ["ss", 42] to str GH#22160
222223 if isinstance (values , tuple ):
223224 values = list (values )
224225 values = construct_1d_object_array_from_listlike (values )
@@ -424,6 +425,7 @@ def isin(comps: AnyArrayLike, values: AnyArrayLike) -> np.ndarray:
424425 values = construct_1d_object_array_from_listlike (list (values ))
425426 # TODO: could use ensure_arraylike here
426427
428+ comps = _ensure_arraylike (comps )
427429 comps = extract_array (comps , extract_numpy = True )
428430 if is_categorical_dtype (comps ):
429431 # TODO(extension)
You can’t perform that action at this time.
0 commit comments