File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -192,15 +192,17 @@ def __dir__():
192
192
193
193
def __getattr__ (name ):
194
194
import warnings
195
- from pandas .core .api import Float64Index , Int64Index , UInt64Index
196
195
197
196
if name in __deprecated_num_index_names :
198
- num_msg = (
197
+ warnings . warn (
199
198
f"pandas.{ name } is deprecated "
200
199
"and will be removed from pandas in a future version. "
201
- "Use pandas.NumericIndex with the appropriate dtype instead."
200
+ "Use pandas.NumericIndex with the appropriate dtype instead." ,
201
+ FutureWarning ,
202
+ stacklevel = 2 ,
202
203
)
203
- warnings .warn (num_msg , FutureWarning , stacklevel = 2 )
204
+ from pandas .core .api import Float64Index , Int64Index , UInt64Index
205
+
204
206
return {
205
207
"Float64Index" : Float64Index ,
206
208
"Int64Index" : Int64Index ,
You can’t perform that action at this time.
0 commit comments