pandas.api.types.is_int64_dtype#

pandas.api.types.is_int64_dtype(arr_or_dtype)[source]#

Check whether the provided array or dtype is of the int64 dtype.

Deprecated since version 2.1.0: is_int64_dtype is deprecated and will be removed in a future version. Use dtype == np.int64 instead.

Parameters:
arr_or_dtypearray-like or dtype

The array or dtype to check.

Returns:
boolean

Whether or not the array or dtype is of the int64 dtype.

See also

api.types.is_float_dtype

Check whether the provided array or dtype is of a float dtype.

api.types.is_bool_dtype

Check whether the provided array or dtype is of a boolean dtype.

api.types.is_object_dtype

Check whether an array-like or dtype is of the object dtype.

numpy.int64

Numpy’s 64-bit integer type.

Notes

Depending on system architecture, the return value of is_int64_dtype( int) will be True if the OS uses 64-bit integers and False if the OS uses 32-bit integers.

Examples

>>> from pandas.api.types import is_int64_dtype
>>> is_int64_dtype(str)  
False
>>> is_int64_dtype(np.int32)  
False
>>> is_int64_dtype(np.int64)  
True
>>> is_int64_dtype("int8")  
False
>>> is_int64_dtype("Int8")  
False
>>> is_int64_dtype(pd.Int64Dtype)  
True
>>> is_int64_dtype(float)  
False
>>> is_int64_dtype(np.uint64)  # unsigned  
False
>>> is_int64_dtype(np.array(["a", "b"]))  
False
>>> is_int64_dtype(np.array([1, 2], dtype=np.int64))  
True
>>> is_int64_dtype(pd.Index([1, 2.0]))  # float  
False
>>> is_int64_dtype(np.array([1, 2], dtype=np.uint32))  # unsigned  
False