Commit c1d1f42
authored
fix: match pandas behavior when assigning listlike to empty dfs (#172)
Previously, we weren't able to assign to empty dfs at all, which is certainly not right. This change also matches the behavior for when there is a multi-index but with empty index columns. The pandas behavior is to throw an error with a somewhat odd error message. (I made our error message explicit.) Note: this bug also occurs for assigning series to empty dfs. However, in that case, fixing it would come at the cost of adding a query to check if there are no rows. That's a big cost, so I haven't fixed the series case.1 parent 0c8bd33 commit c1d1f42
2 files changed
+58
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1101 | 1101 | | |
1102 | 1102 | | |
1103 | 1103 | | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
1109 | | - | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1110 | 1107 | | |
1111 | | - | |
1112 | | - | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
1113 | 1115 | | |
1114 | | - | |
1115 | | - | |
1116 | 1116 | | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1121 | 1136 | | |
1122 | 1137 | | |
1123 | 1138 | | |
1124 | 1139 | | |
1125 | 1140 | | |
1126 | 1141 | | |
1127 | 1142 | | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
| 1143 | + | |
1131 | 1144 | | |
1132 | 1145 | | |
1133 | | - | |
1134 | | - | |
1135 | 1146 | | |
1136 | 1147 | | |
1137 | 1148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
570 | 598 | | |
571 | 599 | | |
572 | 600 | | |
| |||
0 commit comments