Commit 2908dd4
authored
raise error on slice-based selection of multi-index levels (#11168)
previously, calling .sel(level=slice(...)) on a multi-index level
would silently produce wrong results by passing the slice directly
to pandas get_loc_level, which interprets it as a range query on that
level alone. now raises a ValueError with a clear message instead.
closes #105341 parent 1f2472f commit 2908dd4
2 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
1311 | 1321 | | |
1312 | 1322 | | |
1313 | 1323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2246 | 2246 | | |
2247 | 2247 | | |
2248 | 2248 | | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
2249 | 2255 | | |
2250 | 2256 | | |
2251 | 2257 | | |
| |||
0 commit comments