Skip to content

Commit 12f0b6a

Browse files
author
Khor Chean Wei
authored
Test : Pandas 1.0.5 → 1.1.0 behavior change on DataFrame.apply() where fn returns np.ndarray (pandas-dev#46199)
* Update test_frame_apply.py * add * relocate test case * relocate test case * remove iloc
1 parent cd379bb commit 12f0b6a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/frame/methods/test_dtypes.py

+7
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,10 @@ def test_dtypes_timedeltas(self):
131131
index=list("ABCD"),
132132
)
133133
tm.assert_series_equal(result, expected)
134+
135+
def test_frame_apply_np_array_return_type(self):
136+
# GH 35517
137+
df = DataFrame([["foo"]])
138+
result = df.apply(lambda col: np.array("bar"))
139+
expected = Series(["bar"])
140+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)