Skip to content

Commit 8d3a176

Browse files
code sample for pandas-dev#35518
1 parent 26f8033 commit 8d3a176

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bisect/35518.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pandas as pd
2+
3+
print(pd.__version__)
4+
5+
df = pd.DataFrame([["orig1", "orig2"]])
6+
7+
tup = ("new1", "new2")
8+
9+
result = df.apply(func=lambda col: tup)
10+
print(result)
11+
12+
expected = pd.Series([tup, tup])
13+
14+
import pandas.testing as tm
15+
16+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)