Closed
Description
With the removal of IntegerIndex
, FloatIndex
, etc., and now promoting its replacement NumericIndex
, there are a couple of things to consider:
- I think that
NumericIndex
should appear inpandas.__init__.py
like the other Index types so thatpd.NumericIndex
works. - We should document it, since we refer to it in the documentation. It appears as a result in examples, and we refer to it, e.g. here:
https://pandas.pydata.org/docs/dev/reference/api/pandas.Index.html?highlight=numericindex
@topper-123 may be tracking this based on comments in #50908
Metadata
Metadata
Assignees
Labels
No labels
Activity
phofl commentedon Jan 27, 2023
I might be mistaken here, but I think the goal is to remove NumericIndex as well and to include everything in Index
Dr-Irv commentedon Jan 27, 2023
OK. I'm just basing this on what our tests in
pandas-stubs
picked up when we run our tests withpytest
against the nightly builds. Had to remove references that we had toIntegerIndex
and changed them toNumericIndex
. If we are getting rid of that too, then I'll make the change in the tests there when the nightly test fails.topper-123 commentedon Jan 28, 2023
Hi, yes, the goal is to remove
NumericIndex
and have the numpy dtypes that were previously utilized inNumericIndex
, included directly inIndex
instead. I'm hoping to archieve it over this weekend, so I don't know if it will be more time efficient for you to wait doing the corrections now or maybe wait untilNumericIndex
has been removed.I have not given any attention so far to
pandas-stubs
in this process, sorry. I could check if my changes fit well into that package or will you take care of that?Dr-Irv commentedon Jan 30, 2023
We'll take care of that. Once you close this issue, I'll know you've made the changes and can modify the stubs and associated tests.
topper-123 commentedon Jan 30, 2023
👍
Dr-Irv commentedon Feb 6, 2023
@topper-123 I know you have done the work to remove
NumericIndex
, but our 1.5.x docs here say thatNumericIndex
will remain for 2.0: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Int64Index.htmltopper-123 commentedon Feb 6, 2023
Hi @Dr-Irv. The original plan was actually to add
NumericIndex
to the top level namespace, but that was changed later to have all the numeric index functionality merged into the baseIndex
. So that doc string was wrong/should have been updated, when the plans changed...The changes have been made now, and
NumericIndex
has been removed completely now from the code base.Dr-Irv commentedon Feb 6, 2023
So the question is whether our failure to update that doc string means we are violating our own principles with respect to the deprecation policy.
phofl commentedon Feb 6, 2023
Since NumericIndex was never public I‘d say no.
topper-123 commentedon Feb 6, 2023
Yeah, In the 1.4 whatsnew we said:
and the deprecation message was:
In any case, that doc string should have been updated as well...
Dr-Irv commentedon Feb 6, 2023
I think that gives us enough coverage in case someone complains...
jorisvandenbossche commentedon Feb 8, 2023
We can still update the docs for 1.5.x
jorisvandenbossche commentedon Feb 8, 2023
-> #51238