Commit b991274
BUG: unstack with sort=False fails when used with the level parameter… (#56357)
* BUG: unstack with sort=False fails when used with the level parameter (#54987)
Assign new codes to labels when sort=False. This is done so that the data appears to be already sorted,
fixing the bug.
* Minor refactor and cleanup
* Cleanup & remove test
* whatsnew
* Revert test removal
---------
Co-authored-by: richard <rhshadrach@gmail.com>
Co-authored-by: Richard Shadrach <45562402+rhshadrach@users.noreply.github.com>
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>1 parent bdcb192 commit b991274
File tree
4 files changed
+30
-10
lines changed- doc/source/whatsnew
- pandas
- core/reshape
- tests
- frame
- reshape
4 files changed
+30
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
| 480 | + | |
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1321 | 1321 | | |
1322 | 1322 | | |
1323 | 1323 | | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1324 | 1339 | | |
1325 | 1340 | | |
1326 | 1341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2705 | 2705 | | |
2706 | 2706 | | |
2707 | 2707 | | |
2708 | | - | |
| 2708 | + | |
2709 | 2709 | | |
2710 | 2710 | | |
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
2714 | 2714 | | |
2715 | 2715 | | |
2716 | | - | |
2717 | 2716 | | |
2718 | 2717 | | |
0 commit comments