BUG: Creating Index with the names
argument by spacesphere · Pull Request #19168 · pandas-dev/pandas (original) (raw)
@PoppyBagel here's the big pictures. We want to consider the consistency guarantees that pandas offers. We have a loose guaranteee that using the Index
constructor or its sub-classes have the same signature, IM is an exception to this. But for example name
is accepted.
We want to lockdown this guaranteee via tests in one place. It is somewhat tested in each subclass, but not centrally. Further this locks down the behavior of future subclasses, and prevent inadvertant adding it back. More to the point, I am considering removing names
entirely (via deprecation). We need to check for error messages for this.
This is a little bit overkill, to check that we are not accepting an argument, but we have lots of code and inspection can easily fail.
I don't want you to add the names
args anywhere, If its only accepted in MI and Index, then we can next consider the removal implications.