We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a8dfd2 commit 4a45787Copy full SHA for 4a45787
bisect/46867.py
@@ -0,0 +1,18 @@
1
+# BUG: groupby.transform with execution engine numba does not work in multiindex case since 1.3 #46867
2
+
3
+import pandas as pd
4
5
+print(pd.__version__)
6
7
+df = pd.DataFrame([{"A": 1, "B": 2, "C": 3}]).set_index(["A", "B"])
8
9
10
+def numba_func(values, index):
11
+ return 1
12
13
14
+result = df.groupby("A").transform(numba_func, engine="numba")
15
+print(result)
16
17
+expected = pd.DataFrame([{"A": 1, "B": 2, "C": 1.0}]).set_index(["A", "B"])
18
+pd.testing.assert_frame_equal(result, expected)
0 commit comments