Skip to main content
`Ctrl`+`K`

# pandas.Series.str.isnumeric

Series.str.isnumeric()

  Check whether all characters in each string are numeric.

  This is equivalent to running the Python string method `str.isnumeric()` for each element of the Series/Index. If a string has zero characters, `False` is returned for that check.

  Returns:
    Series or Index of bool

      Series or Index of boolean values with the same length as the original Series/Index.

  See also

  `Series.str.isalpha`

    Check whether all characters are alphabetic.

  `Series.str.isalnum`

    Check whether all characters are alphanumeric.

  `Series.str.isdigit`

    Check whether all characters are digits.

  `Series.str.isdecimal`

    Check whether all characters are decimal.

  `Series.str.isspace`

    Check whether all characters are whitespace.

  `Series.str.islower`

    Check whether all characters are lowercase.

  `Series.str.isascii`

    Check whether all characters are ascii.

  `Series.str.isupper`

    Check whether all characters are uppercase.

  `Series.str.istitle`

    Check whether all characters are titlecase.

  Examples

  The `s.str.isnumeric` method is the same as `s3.str.isdigit` but also includes other characters that can represent quantities such as unicode fractions.

      >>> s1 = pd.Series(["one", "one1", "1", "", "³", "⅕"])
      >>> s1.str.isnumeric()
      0    False
      1    False
      2     True
      3    False
      4     True
      5     True
      dtype: bool

  For a string to be considered numeric, all its characters must have a Unicode numeric property matching `str.is_numeric()`. As a consequence, the following cases are not recognized as numeric:

  - Decimal numbers (e.g., “1.1”): due to period `"."`

  - Negative numbers (e.g., “-5”): due to minus sign `"-"`

  - Scientific notation (e.g., “1e3”): due to characters like `"e"`

      >>> s2 = pd.Series(["1.1", "-5", "1e3"])
      >>> s2.str.isnumeric()
      0    False
      1    False
      2    False
      dtype: bool