@@ -90,25 +90,26 @@ would be reassigned as -1. (:issue:`19387`)
9090
9191.. ipython :: python
9292
93- pd.MultiIndex(levels = [[np.nan, None , pd.NaT, 128 , 2 ]], codes = [[0 , - 1 , 1 , 2 , 3 , 4 ]])
94- pd.MultiIndex(levels = [[1 , 2 ]], codes = [[0 , - 2 ]])
93+ mi1 = pd.MultiIndex(levels = [[np.nan, None , pd.NaT, 128 , 2 ]], codes = [[0 , - 1 , 1 , 2 , 3 , 4 ]])
94+ mi2 = pd.MultiIndex(levels = [[1 , 2 ]], codes = [[0 , - 2 ]])
9595
9696 *Previous Behavior *:
9797
9898.. code-block :: ipython
9999
100+ In [1]: mi1
100101 Out[1]: MultiIndex(levels=[[nan, None, NaT, 128, 2]],
101102 codes=[[0, -1, 1, 2, 3, 4]])
103+ In [2]: mi2
102104 Out[2]: MultiIndex(levels=[[1, 2]],
103105 codes=[[0, -2]])
104106
105107 *New Behavior *:
106108
107- .. ipython :: ipython
109+ .. ipython :: python
108110
109- Out[1]: MultiIndex(levels=[[nan, None, NaT, 128, 2]],
110- codes=[[-1, -1, -1, -1, 3, 4]])
111- Out[2]: ValueError: On level 0, code value (-2) < -1
111+ mi1
112+ mi2
112113
113114
114115 .. _whatsnew_0250.api_breaking.groupby_apply_first_group_once :
0 commit comments