@@ -2189,7 +2189,7 @@ def is_boolean(self) -> bool:
2189
2189
See Also
2190
2190
--------
2191
2191
is_integer : Check if the Index only consists of integers.
2192
- is_floating : Check if the Index is a floating type.
2192
+ is_floating : Check if the Index is a floating type (deprecated) .
2193
2193
is_numeric : Check if the Index only consists of numeric data.
2194
2194
is_object : Check if the Index is of the object dtype.
2195
2195
is_categorical : Check if the Index holds categorical data.
@@ -2224,7 +2224,7 @@ def is_integer(self) -> bool:
2224
2224
See Also
2225
2225
--------
2226
2226
is_boolean : Check if the Index only consists of booleans.
2227
- is_floating : Check if the Index is a floating type.
2227
+ is_floating : Check if the Index is a floating type (deprecated) .
2228
2228
is_numeric : Check if the Index only consists of numeric data.
2229
2229
is_object : Check if the Index is of the object dtype.
2230
2230
is_categorical : Check if the Index holds categorical data.
@@ -2251,6 +2251,9 @@ def is_floating(self) -> bool:
2251
2251
"""
2252
2252
Check if the Index is a floating type.
2253
2253
2254
+ .. deprecated:: 2.0.0
2255
+ Use `pandas.api.types.is_float_dtype` instead
2256
+
2254
2257
The Index may consist of only floats, NaNs, or a mix of floats,
2255
2258
integers, or NaNs.
2256
2259
@@ -2287,6 +2290,12 @@ def is_floating(self) -> bool:
2287
2290
>>> idx.is_floating()
2288
2291
False
2289
2292
"""
2293
+ warnings .warn (
2294
+ f"{ type (self ).__name__ } .is_floating is deprecated."
2295
+ "Use pandas.api.types.is_float_dtype instead" ,
2296
+ FutureWarning ,
2297
+ stacklevel = find_stack_level (),
2298
+ )
2290
2299
return self .inferred_type in ["floating" , "mixed-integer-float" , "integer-na" ]
2291
2300
2292
2301
@final
@@ -2303,7 +2312,7 @@ def is_numeric(self) -> bool:
2303
2312
--------
2304
2313
is_boolean : Check if the Index only consists of booleans.
2305
2314
is_integer : Check if the Index only consists of integers.
2306
- is_floating : Check if the Index is a floating type.
2315
+ is_floating : Check if the Index is a floating type (deprecated) .
2307
2316
is_object : Check if the Index is of the object dtype.
2308
2317
is_categorical : Check if the Index holds categorical data.
2309
2318
is_interval : Check if the Index holds Interval objects.
@@ -2346,7 +2355,7 @@ def is_object(self) -> bool:
2346
2355
--------
2347
2356
is_boolean : Check if the Index only consists of booleans.
2348
2357
is_integer : Check if the Index only consists of integers.
2349
- is_floating : Check if the Index is a floating type.
2358
+ is_floating : Check if the Index is a floating type (deprecated) .
2350
2359
is_numeric : Check if the Index only consists of numeric data.
2351
2360
is_categorical : Check if the Index holds categorical data.
2352
2361
is_interval : Check if the Index holds Interval objects.
@@ -2387,7 +2396,7 @@ def is_categorical(self) -> bool:
2387
2396
CategoricalIndex : Index for categorical data.
2388
2397
is_boolean : Check if the Index only consists of booleans.
2389
2398
is_integer : Check if the Index only consists of integers.
2390
- is_floating : Check if the Index is a floating type.
2399
+ is_floating : Check if the Index is a floating type (deprecated) .
2391
2400
is_numeric : Check if the Index only consists of numeric data.
2392
2401
is_object : Check if the Index is of the object dtype.
2393
2402
is_interval : Check if the Index holds Interval objects.
@@ -2430,7 +2439,7 @@ def is_interval(self) -> bool:
2430
2439
IntervalIndex : Index for Interval objects.
2431
2440
is_boolean : Check if the Index only consists of booleans.
2432
2441
is_integer : Check if the Index only consists of integers.
2433
- is_floating : Check if the Index is a floating type.
2442
+ is_floating : Check if the Index is a floating type (deprecated) .
2434
2443
is_numeric : Check if the Index only consists of numeric data.
2435
2444
is_object : Check if the Index is of the object dtype.
2436
2445
is_categorical : Check if the Index holds categorical data.
0 commit comments