polars.Series.is_integer#

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

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

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