Skip to content

Commit

Permalink
TST(string dtype): Resolve xfail with apply returning an ndarray (#60636
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rhshadrach authored Jan 2, 2025
1 parent 8fbe6ac commit 9d2d770
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pandas/tests/frame/methods/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import numpy as np
import pytest

from pandas._config import using_string_dtype

from pandas.core.dtypes.dtypes import DatetimeTZDtype

import pandas as pd
Expand Down Expand Up @@ -135,13 +133,9 @@ def test_dtypes_timedeltas(self):
)
tm.assert_series_equal(result, expected)

@pytest.mark.xfail(using_string_dtype(), reason="TODO(infer_string)")
def test_frame_apply_np_array_return_type(self, using_infer_string):
# GH 35517
df = DataFrame([["foo"]])
result = df.apply(lambda col: np.array("bar"))
if using_infer_string:
expected = Series([np.array(["bar"])])
else:
expected = Series(["bar"])
expected = Series(np.array("bar"))
tm.assert_series_equal(result, expected)

0 comments on commit 9d2d770

Please sign in to comment.