@@ -2189,7 +2189,7 @@ def is_boolean(self) -> bool:
21892189 See Also
21902190 --------
21912191 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) .
21932193 is_numeric : Check if the Index only consists of numeric data.
21942194 is_object : Check if the Index is of the object dtype.
21952195 is_categorical : Check if the Index holds categorical data.
@@ -2224,7 +2224,7 @@ def is_integer(self) -> bool:
22242224 See Also
22252225 --------
22262226 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) .
22282228 is_numeric : Check if the Index only consists of numeric data.
22292229 is_object : Check if the Index is of the object dtype.
22302230 is_categorical : Check if the Index holds categorical data.
@@ -2251,6 +2251,9 @@ def is_floating(self) -> bool:
22512251 """
22522252 Check if the Index is a floating type.
22532253
2254+ .. deprecated:: 2.0.0
2255+ Use `pandas.api.types.is_float_dtype` instead
2256+
22542257 The Index may consist of only floats, NaNs, or a mix of floats,
22552258 integers, or NaNs.
22562259
@@ -2287,6 +2290,12 @@ def is_floating(self) -> bool:
22872290 >>> idx.is_floating()
22882291 False
22892292 """
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+ )
22902299 return self .inferred_type in ["floating" , "mixed-integer-float" , "integer-na" ]
22912300
22922301 @final
@@ -2303,7 +2312,7 @@ def is_numeric(self) -> bool:
23032312 --------
23042313 is_boolean : Check if the Index only consists of booleans.
23052314 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) .
23072316 is_object : Check if the Index is of the object dtype.
23082317 is_categorical : Check if the Index holds categorical data.
23092318 is_interval : Check if the Index holds Interval objects.
@@ -2346,7 +2355,7 @@ def is_object(self) -> bool:
23462355 --------
23472356 is_boolean : Check if the Index only consists of booleans.
23482357 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) .
23502359 is_numeric : Check if the Index only consists of numeric data.
23512360 is_categorical : Check if the Index holds categorical data.
23522361 is_interval : Check if the Index holds Interval objects.
@@ -2387,7 +2396,7 @@ def is_categorical(self) -> bool:
23872396 CategoricalIndex : Index for categorical data.
23882397 is_boolean : Check if the Index only consists of booleans.
23892398 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) .
23912400 is_numeric : Check if the Index only consists of numeric data.
23922401 is_object : Check if the Index is of the object dtype.
23932402 is_interval : Check if the Index holds Interval objects.
@@ -2430,7 +2439,7 @@ def is_interval(self) -> bool:
24302439 IntervalIndex : Index for Interval objects.
24312440 is_boolean : Check if the Index only consists of booleans.
24322441 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) .
24342443 is_numeric : Check if the Index only consists of numeric data.
24352444 is_object : Check if the Index is of the object dtype.
24362445 is_categorical : Check if the Index holds categorical data.
0 commit comments