polars.Series.is_integer#

Series.is_integer(signed: bool | None = None) bool[source]#

Check if this Series datatype is an integer (signed or unsigned).

Deprecated since version 0.19.13: Use Series.dtype.is_integer() instead. For signed/unsigned variants, use Series.dtype.is_signed_integer() or Series.dtype.is_unsigned_integer().

Parameters:
signed
  • if None, both signed and unsigned integer dtypes will match.

  • if True, only signed integer dtypes will be considered a match.

  • if False, only unsigned integer dtypes will be considered a match.

Examples

>>> s = pl.Series("a", [1, 2, 3], dtype=pl.UInt32)
>>> s.is_integer()  
True
>>> s.is_integer(signed=False)  
True
>>> s.is_integer(signed=True)  
False