pyspark.pandas.Series.str.isdigit

str。 isdigit ( )→pyspark.pandas.series.Series

檢查是否每個字符串中所有的人物都是數字。

這相當於運行Python字符串方法str.isdigit ()為每個元素的係列/索引。如果一個字符串是零字符,返回錯誤檢查。

例子

> > >年代=ps係列([“23”,“³”,“⅕”,])

s.str。isdecimalmethod checks for characters used to form numbers in base 10.

> > >年代strisdecimal()0真實1假2錯誤3錯誤dtype: bool

s.str。isdigitmethod is the same as s.str.isdecimal but also includes special digits, like superscripted and subscripted digits in unicode.

> > >年代strisdigit()0真實1真正的2錯誤3錯誤dtype: bool

s.str。isnumericmethod is the same as s.str.isdigit but also includes other characters that can represent quantities such as unicode fractions.

> > >年代strisnumeric()0真實1真正的2真3錯誤dtype: bool