Skip to content

Commit fc8ba2d

Browse files
code sample for pandas-dev#42731
1 parent 19a3c5f commit fc8ba2d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bisect/42731.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# BUG: Series.groupby fails with InvalidIndexError on time series with a tuple-named grouper. #42731
2+
3+
import pandas as pd
4+
5+
print(pd.__version__)
6+
7+
s = pd.Series(index=[pd.Timestamp(2021, 7, 26)], name=("A", 1))
8+
9+
result = s.groupby(s==s) # raises InvalidIndexError
10+
print(result)

0 commit comments

Comments
 (0)