Skip to content

CLN: __all__ for core/index.py #31082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions pandas/core/index.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import warnings

from pandas.core.indexes.api import ( # noqa:F401
from pandas.core.indexes.api import (
CategoricalIndex,
DatetimeIndex,
Float64Index,
Expand All @@ -20,7 +20,30 @@
ensure_index_from_sequences,
get_objs_combined_axis,
)
from pandas.core.indexes.multi import _sparsify # noqa:F401
from pandas.core.indexes.multi import _sparsify

__all__ = [
"CategoricalIndex",
"DatetimeIndex",
"Float64Index",
"Index",
"Int64Index",
"IntervalIndex",
"InvalidIndexError",
"MultiIndex",
"NaT",
"NumericIndex",
"PeriodIndex",
"RangeIndex",
"TimedeltaIndex",
"UInt64Index",
"_new_Index",
"ensure_index",
"ensure_index_from_sequences",
"get_objs_combined_axis",
"_sparsify",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the private methods _new_Index and _sparsify should be in __all__. I guess they are being used by other modules, which shouldn't be the case.

I'm ok to merge it like this, if that's the case, but if you don't mind researching a bit, seeing where those are used, and adding at least a comment about this, that would be great.

I'd probably move these imports at the end, so they are separated from the rest.

]


# GH#30193
warnings.warn(
Expand Down