Commit 09d4a63
committed
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.1 parent 5aa78c0 commit 09d4a63
2 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| |||
795 | 799 | | |
796 | 800 | | |
797 | 801 | | |
798 | | - | |
| 802 | + | |
799 | 803 | | |
800 | 804 | | |
801 | 805 | | |
| |||
| 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 | + | |
2783 | 2794 | | |
2784 | 2795 | | |
2785 | 2796 | | |
| |||
0 commit comments