Commit ae8ea3e
authored
* BUG: Fix DataFrame constructor misclassification of array-like with 'name' attribute
Previously, any object with a .name attribute (like some vtkArray-like objects) was assumed to be a Series or Index, causing the constructor to misinterpret the input.
This fix ensures we only apply the named-Index/Series logic when the input is actually an instance of ABCSeries or ABCIndex *and* has a non-None name.
Closes #61443.
* Apply pre-commit fixes: isort and remove unused type ignore
* TST/CLN: Add issue reference in test and update whatsnew for GH#61443
1 parent 6177e22 commit ae8ea3e
File tree
3 files changed
+20
-2
lines changed- doc/source/whatsnew
- pandas
- core
- tests/frame
3 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
| 907 | + | |
907 | 908 | | |
908 | 909 | | |
909 | 910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
| |||
795 | 799 | | |
796 | 800 | | |
797 | 801 | | |
798 | | - | |
| 802 | + | |
799 | 803 | | |
800 | 804 | | |
801 | 805 | | |
802 | 806 | | |
803 | | - | |
| 807 | + | |
804 | 808 | | |
805 | 809 | | |
806 | 810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2780 | 2780 | | |
2781 | 2781 | | |
2782 | 2782 | | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
2783 | 2796 | | |
2784 | 2797 | | |
2785 | 2798 | | |
| |||
0 commit comments