File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
pandas/tests/frame/methods Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 11import numpy as np
22import pytest
33
4- from pandas ._config import using_string_dtype
5-
64import pandas .util ._test_decorators as td
75
86import pandas as pd
@@ -320,7 +318,6 @@ def test_corrwith_non_timeseries_data(self):
320318 for row in index [:4 ]:
321319 tm .assert_almost_equal (correls [row ], df1 .loc [row ].corr (df2 .loc [row ]))
322320
323- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
324321 def test_corrwith_with_objects (self , using_infer_string ):
325322 df1 = DataFrame (
326323 np .random .default_rng (2 ).standard_normal ((10 , 4 )),
@@ -334,9 +331,8 @@ def test_corrwith_with_objects(self, using_infer_string):
334331 df2 ["obj" ] = "bar"
335332
336333 if using_infer_string :
337- import pyarrow as pa
338-
339- with pytest .raises (pa .lib .ArrowNotImplementedError , match = "has no kernel" ):
334+ msg = "Cannot perform reduction 'mean' with string dtype"
335+ with pytest .raises (TypeError , match = msg ):
340336 df1 .corrwith (df2 )
341337 else :
342338 with pytest .raises (TypeError , match = "Could not convert" ):
You can’t perform that action at this time.
0 commit comments