Skip to content

Commit 6b92b1c

Browse files
authored
CLN: clean-up is_int64_dtype wrt. deprecation (#52808)
CLN: clean is_int64_dtype wrt. deprecation
1 parent 75435a7 commit 6b92b1c

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

pandas/core/dtypes/common.py

+17-12
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,11 @@ def is_int64_dtype(arr_or_dtype) -> bool:
773773
"""
774774
Check whether the provided array or dtype is of the int64 dtype.
775775
776+
.. deprecated:: 2.1.0
777+
778+
is_int64_dtype is deprecated and will be removed in a future
779+
version. Use dtype == np.int64 instead.
780+
776781
Parameters
777782
----------
778783
arr_or_dtype : array-like or dtype
@@ -792,29 +797,29 @@ def is_int64_dtype(arr_or_dtype) -> bool:
792797
Examples
793798
--------
794799
>>> from pandas.api.types import is_int64_dtype
795-
>>> is_int64_dtype(str)
800+
>>> is_int64_dtype(str) # doctest: +SKIP
796801
False
797-
>>> is_int64_dtype(np.int32)
802+
>>> is_int64_dtype(np.int32) # doctest: +SKIP
798803
False
799-
>>> is_int64_dtype(np.int64)
804+
>>> is_int64_dtype(np.int64) # doctest: +SKIP
800805
True
801-
>>> is_int64_dtype('int8')
806+
>>> is_int64_dtype('int8') # doctest: +SKIP
802807
False
803-
>>> is_int64_dtype('Int8')
808+
>>> is_int64_dtype('Int8') # doctest: +SKIP
804809
False
805-
>>> is_int64_dtype(pd.Int64Dtype)
810+
>>> is_int64_dtype(pd.Int64Dtype) # doctest: +SKIP
806811
True
807-
>>> is_int64_dtype(float)
812+
>>> is_int64_dtype(float) # doctest: +SKIP
808813
False
809-
>>> is_int64_dtype(np.uint64) # unsigned
814+
>>> is_int64_dtype(np.uint64) # unsigned # doctest: +SKIP
810815
False
811-
>>> is_int64_dtype(np.array(['a', 'b']))
816+
>>> is_int64_dtype(np.array(['a', 'b'])) # doctest: +SKIP
812817
False
813-
>>> is_int64_dtype(np.array([1, 2], dtype=np.int64))
818+
>>> is_int64_dtype(np.array([1, 2], dtype=np.int64)) # doctest: +SKIP
814819
True
815-
>>> is_int64_dtype(pd.Index([1, 2.])) # float
820+
>>> is_int64_dtype(pd.Index([1, 2.])) # float # doctest: +SKIP
816821
False
817-
>>> is_int64_dtype(np.array([1, 2], dtype=np.uint32)) # unsigned
822+
>>> is_int64_dtype(np.array([1, 2], dtype=np.uint32)) # unsigned # doctest: +SKIP
818823
False
819824
"""
820825
# GH#52564

0 commit comments

Comments
 (0)