API: should setitem-with-expansion _ever_ raise? #37774
Labels
API Design
Indexing
Related to indexing on series/frames, not to indexes themselves
Needs Discussion
Requires discussion from core team before further action
Uh oh!
There was an error while loading. Please reload this page.
ATM we are pretty inconsistent as to when setitem-with-expansion raises. This boils down to idiosyncratic casting rules for
Index.insert
mentioned in today's dev call.Examples:
I see two options:
Option 2 seems the more user-friendly, and is necessary for e.g. some of our
crosstab
tests which insert "All". AFAICT that is why DTI/TDI have a special case casting for strings and raising for everything else.The text was updated successfully, but these errors were encountered: