- API reference
- pandas arrays, scalars, and data types
- pandas.api.t...
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 futureversion. 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.
Notes
Depending on system architecture, the return value ofis_int64_dtype(int) will be True if the OS uses 64-bit integers and False if the OSuses 32-bit integers.
Examples
>>>frompandas.api.typesimportis_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)# unsignedFalse>>>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.]))# floatFalse>>>is_int64_dtype(np.array([1,2],dtype=np.uint32))# unsignedFalse
On this page