Commit 03e0947
Vikram Bhandoh
Partially fixes GH8732
In most cases it looks like, we need to iterate over array and coerce each element. This is so that the appropriate exception can be raised, or we can deal with nulls. So the original case of casting ints to strings, has to work the way it does, unless we change the underlying behaviour. So when astype(str) is called on ints. Then each element is first cast as a string then made into a numpy object. If we relied on numpy it wouldn't cast it to string, just return it as an object. This breaks existing behaviour. It is possible to bypass iterating over the array, when we are coercing to int. Assuming that there are no NaNs and the type of the array is a numeric.1 parent 2063c1f commit 03e0947
File tree
6 files changed
+63
-4
lines changed- pandas
- core
- tests
- util
- vb_suite
6 files changed
+63
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2585 | 2585 | | |
2586 | 2586 | | |
2587 | 2587 | | |
| 2588 | + | |
| 2589 | + | |
2588 | 2590 | | |
2589 | | - | |
| 2591 | + | |
2590 | 2592 | | |
2591 | 2593 | | |
2592 | 2594 | | |
2593 | 2595 | | |
2594 | 2596 | | |
2595 | | - | |
2596 | 2597 | | |
2597 | 2598 | | |
2598 | 2599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
830 | | - | |
| 830 | + | |
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
840 | 843 | | |
841 | 844 | | |
842 | 845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
563 | | - | |
| 563 | + | |
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
568 | 584 | | |
569 | 585 | | |
570 | 586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
897 | 911 | | |
898 | 912 | | |
899 | 913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments