Commit 882fa9c
BUG: Fix inconsistency of converting empty categorical with dtype_backend='pyarrow' (#61131)
* Handling the case where converting empty categorical to 'pyarrow' dtype_backend results in error. Since conversion of non-empty categorical returns categorical of 'numpy_nullable' dtype_backend, now, instead of raising an error, we ensure empty categorical is returned as well.
* additional revisions
* removing the change for input_array...
* reverting newline in Series.convert_dtypes and precising respective docs in whatsnew
* revised testing to resolve CI errors v2
* Finish the pr
* Update doc/source/whatsnew/v3.0.0.rst
Co-authored-by: Matthew Roeschke <[email protected]>
* paramterize test
* move condition
---------
Co-authored-by: veljanin <[email protected]>
Co-authored-by: Matthew Roeschke <[email protected]>1 parent 6b6393d commit 882fa9c
File tree
4 files changed
+27
-0
lines changed- doc/source/whatsnew
- pandas
- core/dtypes
- tests
- frame/methods
- series/methods
4 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| 639 | + | |
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1127 | 1127 | | |
1128 | 1128 | | |
1129 | 1129 | | |
| 1130 | + | |
1130 | 1131 | | |
1131 | 1132 | | |
1132 | 1133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
301 | 311 | | |
302 | 312 | | |
303 | 313 | | |
| |||
0 commit comments