Skip to content

Commit 00e3ddc

Browse files
code sample for pandas-dev#38979
1 parent 7fd5446 commit 00e3ddc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

bisect/38979.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import pandas as pd
2+
import pandas.testing as tm
3+
4+
print(pd.__version__)
5+
6+
df = pd.DataFrame(zip("abc", "def"))
7+
8+
expected = df.apply(lambda f: "/".join(f), axis=1).str.upper()
9+
10+
result = df.apply(lambda f: "/".join(f.str.upper()), axis=1)
11+
12+
print(result)
13+
14+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)