neulab/docprompting-conala huggingface dataset:
pandas.api.types.is_categorical   pandas.api.types.is_categorical(arr)[source]
 
Check whether an array-like is a Categorical instance.  Parameters 
 
arr:array-like


The array-like to check.    Returns 
 boolean

Whether or not the array-like is of a Categorical instance.     Examples 
>>> is_categorical([1, 2, 3])
False
  Categoricals, Series Categoricals, and CategoricalIndex will return True. 
>>> cat = pd.Categorical([1, 2, 3])
>>> is_categorical(cat)
True
>>> is_categorical(pd.Series(cat))
True
>>> is_categorical(pd.CategoricalIndex([1, 2, 3]))
True
pandas.api.types.is_categorical_dtype   pandas.api.types.is_categorical_dtype(arr_or_dtype)[source]
 
Check whether an array-like or dtype is of the Categorical dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array-like or dtype to check.    Returns 
 boolean

Whether or not the array-like or dtype is of the Categorical dtype.     Examples 
>>> is_categorical_dtype(object)
False
>>> is_categorical_dtype(CategoricalDtype())
True
>>> is_categorical_dtype([1, 2, 3])
False
>>> is_categorical_dtype(pd.Categorical([1, 2, 3]))
True
>>> is_categorical_dtype(pd.CategoricalIndex([1, 2, 3]))
True
pandas.api.types.is_complex   pandas.api.types.is_complex()
 
Return True if given object is complex.  Returns 
 bool
pandas.api.types.is_complex_dtype   pandas.api.types.is_complex_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of a complex dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 boolean

Whether or not the array or dtype is of a complex dtype.     Examples 
>>> is_complex_dtype(str)
False
>>> is_complex_dtype(int)
False
>>> is_complex_dtype(np.complex_)
True
>>> is_complex_dtype(np.array(['a', 'b']))
False
>>> is_complex_dtype(pd.Series([1, 2]))
False
>>> is_complex_dtype(np.array([1 + 1j, 5]))
True
pandas.api.types.is_datetime64_any_dtype   pandas.api.types.is_datetime64_any_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of the datetime64 dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 bool

Whether or not the array or dtype is of the datetime64 dtype.     Examples 
>>> is_datetime64_any_dtype(str)
False
>>> is_datetime64_any_dtype(int)
False
>>> is_datetime64_any_dtype(np.datetime64)  # can be tz-naive
True
>>> is_datetime64_any_dtype(DatetimeTZDtype("ns", "US/Eastern"))
True
>>> is_datetime64_any_dtype(np.array(['a', 'b']))
False
>>> is_datetime64_any_dtype(np.array([1, 2]))
False
>>> is_datetime64_any_dtype(np.array([], dtype="datetime64[ns]"))
True
>>> is_datetime64_any_dtype(pd.DatetimeIndex([1, 2, 3], dtype="datetime64[ns]"))
True
pandas.api.types.is_datetime64_dtype   pandas.api.types.is_datetime64_dtype(arr_or_dtype)[source]
 
Check whether an array-like or dtype is of the datetime64 dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array-like or dtype to check.    Returns 
 boolean

Whether or not the array-like or dtype is of the datetime64 dtype.     Examples 
>>> is_datetime64_dtype(object)
False
>>> is_datetime64_dtype(np.datetime64)
True
>>> is_datetime64_dtype(np.array([], dtype=int))
False
>>> is_datetime64_dtype(np.array([], dtype=np.datetime64))
True
>>> is_datetime64_dtype([1, 2, 3])
False
pandas.api.types.is_datetime64_ns_dtype   pandas.api.types.is_datetime64_ns_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of the datetime64[ns] dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 bool

Whether or not the array or dtype is of the datetime64[ns] dtype.     Examples 
>>> is_datetime64_ns_dtype(str)
False
>>> is_datetime64_ns_dtype(int)
False
>>> is_datetime64_ns_dtype(np.datetime64)  # no unit
False
>>> is_datetime64_ns_dtype(DatetimeTZDtype("ns", "US/Eastern"))
True
>>> is_datetime64_ns_dtype(np.array(['a', 'b']))
False
>>> is_datetime64_ns_dtype(np.array([1, 2]))
False
>>> is_datetime64_ns_dtype(np.array([], dtype="datetime64"))  # no unit
False
>>> is_datetime64_ns_dtype(np.array([], dtype="datetime64[ps]"))  # wrong unit
False
>>> is_datetime64_ns_dtype(pd.DatetimeIndex([1, 2, 3], dtype="datetime64[ns]"))
True
pandas.api.types.is_datetime64tz_dtype   pandas.api.types.is_datetime64tz_dtype(arr_or_dtype)[source]
 
Check whether an array-like or dtype is of a DatetimeTZDtype dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array-like or dtype to check.    Returns 
 boolean

Whether or not the array-like or dtype is of a DatetimeTZDtype dtype.     Examples 
>>> is_datetime64tz_dtype(object)
False
>>> is_datetime64tz_dtype([1, 2, 3])
False
>>> is_datetime64tz_dtype(pd.DatetimeIndex([1, 2, 3]))  # tz-naive
False
>>> is_datetime64tz_dtype(pd.DatetimeIndex([1, 2, 3], tz="US/Eastern"))
True
  
>>> dtype = DatetimeTZDtype("ns", tz="US/Eastern")
>>> s = pd.Series([], dtype=dtype)
>>> is_datetime64tz_dtype(dtype)
True
>>> is_datetime64tz_dtype(s)
True
pandas.api.types.is_dict_like   pandas.api.types.is_dict_like(obj)[source]
 
Check if the object is dict-like.  Parameters 
 
obj:The object to check

  Returns 
 
is_dict_like:bool


Whether obj has dict-like properties.     Examples 
>>> is_dict_like({1: 2})
True
>>> is_dict_like([1, 2, 3])
False
>>> is_dict_like(dict)
False
>>> is_dict_like(dict())
True
pandas.api.types.is_extension_array_dtype   pandas.api.types.is_extension_array_dtype(arr_or_dtype)[source]
 
Check if an object is a pandas extension array type. See the Use Guide for more.  Parameters 
 
arr_or_dtype:object


For array-like input, the .dtype attribute will be extracted.    Returns 
 bool

Whether the arr_or_dtype is an extension array type.     Notes This checks whether an object implements the pandas extension array interface. In pandas, this includes:  Categorical Sparse Interval Period DatetimeArray TimedeltaArray  Third-party libraries may implement arrays or types satisfying this interface as well. Examples 
>>> from pandas.api.types import is_extension_array_dtype
>>> arr = pd.Categorical(['a', 'b'])
>>> is_extension_array_dtype(arr)
True
>>> is_extension_array_dtype(arr.dtype)
True
  
>>> arr = np.array(['a', 'b'])
>>> is_extension_array_dtype(arr.dtype)
False
pandas.api.types.is_extension_type   pandas.api.types.is_extension_type(arr)[source]
 
Check whether an array-like is of a pandas extension class instance.  Deprecated since version 1.0.0: Use is_extension_array_dtype instead.  Extension classes include categoricals, pandas sparse objects (i.e. classes represented within the pandas library and not ones external to it like scipy sparse matrices), and datetime-like arrays.  Parameters 
 
arr:array-like, scalar


The array-like to check.    Returns 
 boolean

Whether or not the array-like is of a pandas extension class instance.     Examples 
>>> is_extension_type([1, 2, 3])
False
>>> is_extension_type(np.array([1, 2, 3]))
False
>>>
>>> cat = pd.Categorical([1, 2, 3])
>>>
>>> is_extension_type(cat)
True
>>> is_extension_type(pd.Series(cat))
True
>>> is_extension_type(pd.arrays.SparseArray([1, 2, 3]))
True
>>> from scipy.sparse import bsr_matrix
>>> is_extension_type(bsr_matrix([1, 2, 3]))
False
>>> is_extension_type(pd.DatetimeIndex([1, 2, 3]))
False
>>> is_extension_type(pd.DatetimeIndex([1, 2, 3], tz="US/Eastern"))
True
>>>
>>> dtype = DatetimeTZDtype("ns", tz="US/Eastern")
>>> s = pd.Series([], dtype=dtype)
>>> is_extension_type(s)
True
pandas.api.types.is_file_like   pandas.api.types.is_file_like(obj)[source]
 
Check if the object is a file-like object. For objects to be considered file-like, they must be an iterator AND have either a read and/or write method as an attribute. Note: file-like objects must be iterable, but iterable objects need not be file-like.  Parameters 
 
obj:The object to check

  Returns 
 
is_file_like:bool


Whether obj has file-like properties.     Examples 
>>> import io
>>> buffer = io.StringIO("data")
>>> is_file_like(buffer)
True
>>> is_file_like([1, 2, 3])
False
pandas.api.types.is_float   pandas.api.types.is_float()
 
Return True if given object is float.  Returns 
 bool
pandas.api.types.is_float_dtype   pandas.api.types.is_float_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of a float dtype. This function is internal and should not be exposed in the public API.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 boolean

Whether or not the array or dtype is of a float dtype.     Examples 
>>> is_float_dtype(str)
False
>>> is_float_dtype(int)
False
>>> is_float_dtype(float)
True
>>> is_float_dtype(np.array(['a', 'b']))
False
>>> is_float_dtype(pd.Series([1, 2]))
False
>>> is_float_dtype(pd.Index([1, 2.]))
True
pandas.api.types.is_hashable   pandas.api.types.is_hashable(obj)[source]
 
Return True if hash(obj) will succeed, False otherwise. Some types will pass a test against collections.abc.Hashable but fail when they are actually hashed with hash(). Distinguish between these and other types by trying the call to hash() and seeing if they raise TypeError.  Returns 
 bool
   Examples 
>>> import collections
>>> a = ([],)
>>> isinstance(a, collections.abc.Hashable)
True
>>> is_hashable(a)
False
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.  Parameters 
 
arr_or_dtype:array-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 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 
>>> 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.]))  # float
False
>>> is_int64_dtype(np.array([1, 2], dtype=np.uint32))  # unsigned
False
pandas.api.types.is_integer   pandas.api.types.is_integer()
 
Return True if given object is integer.  Returns 
 bool
pandas.api.types.is_integer_dtype   pandas.api.types.is_integer_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of an integer dtype. Unlike in is_any_int_dtype, timedelta64 instances will return False. The nullable Integer dtypes (e.g. pandas.Int64Dtype) are also considered as integer by this function.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 boolean

Whether or not the array or dtype is of an integer dtype and not an instance of timedelta64.     Examples 
>>> is_integer_dtype(str)
False
>>> is_integer_dtype(int)
True
>>> is_integer_dtype(float)
False
>>> is_integer_dtype(np.uint64)
True
>>> is_integer_dtype('int8')
True
>>> is_integer_dtype('Int8')
True
>>> is_integer_dtype(pd.Int8Dtype)
True
>>> is_integer_dtype(np.datetime64)
False
>>> is_integer_dtype(np.timedelta64)
False
>>> is_integer_dtype(np.array(['a', 'b']))
False
>>> is_integer_dtype(pd.Series([1, 2]))
True
>>> is_integer_dtype(np.array([], dtype=np.timedelta64))
False
>>> is_integer_dtype(pd.Index([1, 2.]))  # float
False
pandas.api.types.is_interval_dtype   pandas.api.types.is_interval_dtype(arr_or_dtype)[source]
 
Check whether an array-like or dtype is of the Interval dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array-like or dtype to check.    Returns 
 boolean

Whether or not the array-like or dtype is of the Interval dtype.     Examples 
>>> is_interval_dtype(object)
False
>>> is_interval_dtype(IntervalDtype())
True
>>> is_interval_dtype([1, 2, 3])
False
>>>
>>> interval = pd.Interval(1, 2, closed="right")
>>> is_interval_dtype(interval)
False
>>> is_interval_dtype(pd.IntervalIndex([interval]))
True
pandas.api.types.is_iterator   pandas.api.types.is_iterator()
 
Check if the object is an iterator. This is intended for generators, not list-like objects.  Parameters 
 
obj:The object to check

  Returns 
 
is_iter:bool


Whether obj is an iterator.     Examples 
>>> import datetime
>>> is_iterator((x for x in []))
True
>>> is_iterator([1, 2, 3])
False
>>> is_iterator(datetime.datetime(2017, 1, 1))
False
>>> is_iterator("foo")
False
>>> is_iterator(1)
False
pandas.api.types.is_list_like   pandas.api.types.is_list_like()
 
Check if the object is list-like. Objects that are considered list-like are for example Python lists, tuples, sets, NumPy arrays, and Pandas Series. Strings and datetime objects, however, are not considered list-like.  Parameters 
 
obj:object


Object to check.  
allow_sets:bool, default True


If this parameter is False, sets will not be considered list-like.    Returns 
 bool

Whether obj has list-like properties.     Examples 
>>> import datetime
>>> is_list_like([1, 2, 3])
True
>>> is_list_like({1, 2, 3})
True
>>> is_list_like(datetime.datetime(2017, 1, 1))
False
>>> is_list_like("foo")
False
>>> is_list_like(1)
False
>>> is_list_like(np.array([2]))
True
>>> is_list_like(np.array(2))
False
pandas.api.types.is_named_tuple   pandas.api.types.is_named_tuple(obj)[source]
 
Check if the object is a named tuple.  Parameters 
 
obj:The object to check

  Returns 
 
is_named_tuple:bool


Whether obj is a named tuple.     Examples 
>>> from collections import namedtuple
>>> Point = namedtuple("Point", ["x", "y"])
>>> p = Point(1, 2)
>>>
>>> is_named_tuple(p)
True
>>> is_named_tuple((1, 2))
False
pandas.api.types.is_number   pandas.api.types.is_number(obj)[source]
 
Check if the object is a number. Returns True when the object is a number, and False if is not.  Parameters 
 
obj:any type


The object to check if is a number.    Returns 
 
is_number:bool


Whether obj is a number or not.      See also  api.types.is_integer

Checks a subgroup of numbers.    Examples 
>>> from pandas.api.types import is_number
>>> is_number(1)
True
>>> is_number(7.15)
True
  Booleans are valid because they are int subclass. 
>>> is_number(False)
True
  
>>> is_number("foo")
False
>>> is_number("5")
False
pandas.api.types.is_numeric_dtype   pandas.api.types.is_numeric_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of a numeric dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 boolean

Whether or not the array or dtype is of a numeric dtype.     Examples 
>>> is_numeric_dtype(str)
False
>>> is_numeric_dtype(int)
True
>>> is_numeric_dtype(float)
True
>>> is_numeric_dtype(np.uint64)
True
>>> is_numeric_dtype(np.datetime64)
False
>>> is_numeric_dtype(np.timedelta64)
False
>>> is_numeric_dtype(np.array(['a', 'b']))
False
>>> is_numeric_dtype(pd.Series([1, 2]))
True
>>> is_numeric_dtype(pd.Index([1, 2.]))
True
>>> is_numeric_dtype(np.array([], dtype=np.timedelta64))
False
pandas.api.types.is_object_dtype   pandas.api.types.is_object_dtype(arr_or_dtype)[source]
 
Check whether an array-like or dtype is of the object dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array-like or dtype to check.    Returns 
 boolean

Whether or not the array-like or dtype is of the object dtype.     Examples 
>>> is_object_dtype(object)
True
>>> is_object_dtype(int)
False
>>> is_object_dtype(np.array([], dtype=object))
True
>>> is_object_dtype(np.array([], dtype=int))
False
>>> is_object_dtype([1, 2, 3])
False
pandas.api.types.is_period_dtype   pandas.api.types.is_period_dtype(arr_or_dtype)[source]
 
Check whether an array-like or dtype is of the Period dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array-like or dtype to check.    Returns 
 boolean

Whether or not the array-like or dtype is of the Period dtype.     Examples 
>>> is_period_dtype(object)
False
>>> is_period_dtype(PeriodDtype(freq="D"))
True
>>> is_period_dtype([1, 2, 3])
False
>>> is_period_dtype(pd.Period("2017-01-01"))
False
>>> is_period_dtype(pd.PeriodIndex([], freq="A"))
True
pandas.api.types.is_re   pandas.api.types.is_re(obj)[source]
 
Check if the object is a regex pattern instance.  Parameters 
 
obj:The object to check

  Returns 
 
is_regex:bool


Whether obj is a regex pattern.     Examples 
>>> is_re(re.compile(".*"))
True
>>> is_re("foo")
False
pandas.api.types.is_re_compilable   pandas.api.types.is_re_compilable(obj)[source]
 
Check if the object can be compiled into a regex pattern instance.  Parameters 
 
obj:The object to check

  Returns 
 
is_regex_compilable:bool


Whether obj can be compiled as a regex pattern.     Examples 
>>> is_re_compilable(".*")
True
>>> is_re_compilable(1)
False
pandas.api.types.is_scalar   pandas.api.types.is_scalar()
 
Return True if given object is scalar.  Parameters 
 
val:object


This includes:  numpy array scalar (e.g. np.int64) Python builtin numerics Python builtin byte arrays and strings None datetime.datetime datetime.timedelta Period decimal.Decimal Interval DateOffset Fraction Number.     Returns 
 bool

Return True if given object is scalar.     Examples 
>>> import datetime
>>> dt = datetime.datetime(2018, 10, 3)
>>> pd.api.types.is_scalar(dt)
True
  
>>> pd.api.types.is_scalar([2, 3])
False
  
>>> pd.api.types.is_scalar({0: 1, 2: 3})
False
  
>>> pd.api.types.is_scalar((0, 2))
False
  pandas supports PEP 3141 numbers: 
>>> from fractions import Fraction
>>> pd.api.types.is_scalar(Fraction(3, 5))
True
pandas.api.types.is_signed_integer_dtype   pandas.api.types.is_signed_integer_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of a signed integer dtype. Unlike in is_any_int_dtype, timedelta64 instances will return False. The nullable Integer dtypes (e.g. pandas.Int64Dtype) are also considered as integer by this function.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 boolean

Whether or not the array or dtype is of a signed integer dtype and not an instance of timedelta64.     Examples 
>>> is_signed_integer_dtype(str)
False
>>> is_signed_integer_dtype(int)
True
>>> is_signed_integer_dtype(float)
False
>>> is_signed_integer_dtype(np.uint64)  # unsigned
False
>>> is_signed_integer_dtype('int8')
True
>>> is_signed_integer_dtype('Int8')
True
>>> is_signed_integer_dtype(pd.Int8Dtype)
True
>>> is_signed_integer_dtype(np.datetime64)
False
>>> is_signed_integer_dtype(np.timedelta64)
False
>>> is_signed_integer_dtype(np.array(['a', 'b']))
False
>>> is_signed_integer_dtype(pd.Series([1, 2]))
True
>>> is_signed_integer_dtype(np.array([], dtype=np.timedelta64))
False
>>> is_signed_integer_dtype(pd.Index([1, 2.]))  # float
False
>>> is_signed_integer_dtype(np.array([1, 2], dtype=np.uint32))  # unsigned
False
pandas.api.types.is_sparse   pandas.api.types.is_sparse(arr)[source]
 
Check whether an array-like is a 1-D pandas sparse array. Check that the one-dimensional array-like is a pandas sparse array. Returns True if it is a pandas sparse array, not another type of sparse array.  Parameters 
 
arr:array-like


Array-like to check.    Returns 
 bool

Whether or not the array-like is a pandas sparse array.     Examples Returns True if the parameter is a 1-D pandas sparse array. 
>>> is_sparse(pd.arrays.SparseArray([0, 0, 1, 0]))
True
>>> is_sparse(pd.Series(pd.arrays.SparseArray([0, 0, 1, 0])))
True
  Returns False if the parameter is not sparse. 
>>> is_sparse(np.array([0, 0, 1, 0]))
False
>>> is_sparse(pd.Series([0, 1, 0, 0]))
False
  Returns False if the parameter is not a pandas sparse array. 
>>> from scipy.sparse import bsr_matrix
>>> is_sparse(bsr_matrix([0, 1, 0, 0]))
False
  Returns False if the parameter has more than one dimension.
pandas.api.types.is_string_dtype   pandas.api.types.is_string_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of the string dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 boolean

Whether or not the array or dtype is of the string dtype.     Examples 
>>> is_string_dtype(str)
True
>>> is_string_dtype(object)
True
>>> is_string_dtype(int)
False
>>>
>>> is_string_dtype(np.array(['a', 'b']))
True
>>> is_string_dtype(pd.Series([1, 2]))
False
pandas.api.types.is_timedelta64_dtype   pandas.api.types.is_timedelta64_dtype(arr_or_dtype)[source]
 
Check whether an array-like or dtype is of the timedelta64 dtype.  Parameters 
 
arr_or_dtype:array-like or dtype


The array-like or dtype to check.    Returns 
 boolean

Whether or not the array-like or dtype is of the timedelta64 dtype.     Examples 
>>> is_timedelta64_dtype(object)
False
>>> is_timedelta64_dtype(np.timedelta64)
True
>>> is_timedelta64_dtype([1, 2, 3])
False
>>> is_timedelta64_dtype(pd.Series([], dtype="timedelta64[ns]"))
True
>>> is_timedelta64_dtype('0 days')
False
pandas.api.types.is_timedelta64_ns_dtype   pandas.api.types.is_timedelta64_ns_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of the timedelta64[ns] dtype. This is a very specific dtype, so generic ones like np.timedelta64 will return False if passed into this function.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 boolean

Whether or not the array or dtype is of the timedelta64[ns] dtype.     Examples 
>>> is_timedelta64_ns_dtype(np.dtype('m8[ns]'))
True
>>> is_timedelta64_ns_dtype(np.dtype('m8[ps]'))  # Wrong frequency
False
>>> is_timedelta64_ns_dtype(np.array([1, 2], dtype='m8[ns]'))
True
>>> is_timedelta64_ns_dtype(np.array([1, 2], dtype=np.timedelta64))
False
pandas.api.types.is_unsigned_integer_dtype   pandas.api.types.is_unsigned_integer_dtype(arr_or_dtype)[source]
 
Check whether the provided array or dtype is of an unsigned integer dtype. The nullable Integer dtypes (e.g. pandas.UInt64Dtype) are also considered as integer by this function.  Parameters 
 
arr_or_dtype:array-like or dtype


The array or dtype to check.    Returns 
 boolean

Whether or not the array or dtype is of an unsigned integer dtype.     Examples 
>>> is_unsigned_integer_dtype(str)
False
>>> is_unsigned_integer_dtype(int)  # signed
False
>>> is_unsigned_integer_dtype(float)
False
>>> is_unsigned_integer_dtype(np.uint64)
True
>>> is_unsigned_integer_dtype('uint8')
True
>>> is_unsigned_integer_dtype('UInt8')
True
>>> is_unsigned_integer_dtype(pd.UInt8Dtype)
True
>>> is_unsigned_integer_dtype(np.array(['a', 'b']))
False
>>> is_unsigned_integer_dtype(pd.Series([1, 2]))  # signed
False
>>> is_unsigned_integer_dtype(pd.Index([1, 2.]))  # float
False
>>> is_unsigned_integer_dtype(np.array([1, 2], dtype=np.uint32))
True
pandas.api.types.pandas_dtype   pandas.api.types.pandas_dtype(dtype)[source]
 
Convert input into a pandas only dtype object or a numpy dtype object.  Parameters 
 
dtype:object to be converted

  Returns 
 np.dtype or a pandas dtype
  Raises 
 TypeError if not a dtype