File tree 1 file changed +2
-6
lines changed
pandas/tests/frame/methods
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1
1
import numpy as np
2
2
import pytest
3
3
4
- from pandas ._config import using_string_dtype
5
-
6
4
import pandas .util ._test_decorators as td
7
5
8
6
import pandas as pd
@@ -320,7 +318,6 @@ def test_corrwith_non_timeseries_data(self):
320
318
for row in index [:4 ]:
321
319
tm .assert_almost_equal (correls [row ], df1 .loc [row ].corr (df2 .loc [row ]))
322
320
323
- @pytest .mark .xfail (using_string_dtype (), reason = "TODO(infer_string)" )
324
321
def test_corrwith_with_objects (self , using_infer_string ):
325
322
df1 = DataFrame (
326
323
np .random .default_rng (2 ).standard_normal ((10 , 4 )),
@@ -334,9 +331,8 @@ def test_corrwith_with_objects(self, using_infer_string):
334
331
df2 ["obj" ] = "bar"
335
332
336
333
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 ):
340
336
df1 .corrwith (df2 )
341
337
else :
342
338
with pytest .raises (TypeError , match = "Could not convert" ):
You can’t perform that action at this time.
0 commit comments