Skip to content

Commit 3c70c15

Browse files
committed
update message
1 parent bdc1be9 commit 3c70c15

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/tests/groupby/test_raises.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,13 @@ def test_groupby_raises_string(
219219
elif groupby_func in ["cummin", "cummax"]:
220220
msg = msg.replace("object", "str")
221221
elif groupby_func == "corrwith":
222-
msg = "'.*NumpySemantics' with dtype str does not support operation 'mean'"
222+
if df["d"].dtype.storage == "pyarrow":
223+
msg = (
224+
"ArrowStringArrayNumpySemantics' with dtype str does not "
225+
"support operation 'mean'"
226+
)
227+
else:
228+
msg = "Cannot perform reduction 'mean' with string dtype"
223229

224230
if groupby_func == "fillna":
225231
kind = "Series" if groupby_series else "DataFrame"

0 commit comments

Comments
 (0)