We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7335cb3 commit 64da71fCopy full SHA for 64da71f
pandas/__init__.py
@@ -192,15 +192,17 @@ def __dir__():
192
193
def __getattr__(name):
194
import warnings
195
- from pandas.core.api import Float64Index, Int64Index, UInt64Index
196
197
if name in __deprecated_num_index_names:
198
- num_msg = (
+ warnings.warn(
199
f"pandas.{name} is deprecated "
200
"and will be removed from pandas in a future version. "
201
- "Use pandas.NumericIndex with the appropriate dtype instead."
+ "Use pandas.NumericIndex with the appropriate dtype instead.",
+ FutureWarning,
202
+ stacklevel=2,
203
)
- warnings.warn(num_msg, FutureWarning, stacklevel=2)
204
+ from pandas.core.api import Float64Index, Int64Index, UInt64Index
205
+
206
return {
207
"Float64Index": Float64Index,
208
"Int64Index": Int64Index,
0 commit comments