Skip to content

Commit b6587c1

Browse files
code sample for pandas-dev#39636
1 parent c772789 commit b6587c1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bisect/39636.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import pandas as pd
2+
import pandas.testing as tm
3+
4+
print(pd.__version__)
5+
6+
df = pd.DataFrame([], columns=["id", "field"])
7+
8+
result = df["id"].transform(lambda x: x + 10)
9+
print(result)
10+
11+
expected = pd.Series([], index=pd.Index([], dtype="object"), name="id", dtype="object")
12+
13+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)