Skip to content

Commit 4ce5605

Browse files
code sample for pandas-dev#37755
1 parent 1b803cd commit 4ce5605

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

bisect/37755.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import pandas as pd
2+
3+
print(pd.__version__)
4+
5+
6+
print("Test 1")
7+
a = pd.Series([1, 2, 3, 4], index=[1, 1, 2, 2], name=("a", "a"))
8+
a.index.name = ("b", "b")
9+
print(a)
10+
print(a.index)
11+
print(a.groupby(level=0).last())
12+
13+
print("Test 2")
14+
a = pd.Series([1, 2, 3, 4], index=[2, 3, 4, 5], name=("a", "a"))
15+
b = pd.Series([1, 1, 2, 2], index=[2, 3, 4, 5], name=("b", "b"))
16+
a.index = b.reindex(a.index)
17+
print(a)
18+
print(a.index)
19+
print(a.groupby(level=0).last())

0 commit comments

Comments
 (0)