Ejemplo n.º 1
0
 def _str_istitle(self):
     if hasattr(pc, "utf8_is_title"):
         result = pc.utf8_is_title(self._data)
         return BooleanDtype().__from_arrow__(result)
     else:
         return super()._str_istitle()
Ejemplo n.º 2
0
 def _str_istitle(self):
     if hasattr(pc, "utf8_is_title"):
         return type(self)(pc.utf8_is_title(self.data))
     else:
         return super()._str_istitle()
Ejemplo n.º 3
0
 def _str_istitle(self):
     result = pc.utf8_is_title(self._data)
     return BooleanDtype().__from_arrow__(result)
Ejemplo n.º 4
0
    TextAccessor.isdigit = lambda self: self.obj.str.isdigit()  # type: ignore
    TextAccessor.isspace = lambda self: self.obj.str.isspace()  # type: ignore
    TextAccessor.islower = lambda self: self.obj.str.islower()  # type: ignore
    TextAccessor.isupper = lambda self: self.obj.str.isupper()  # type: ignore
    TextAccessor.istitle = lambda self: self.obj.str.istitle()  # type: ignore
    TextAccessor.isnumeric = lambda self: self.obj.str.isnumeric(
    )  # type: ignore
    TextAccessor.isdecimal = lambda self: self.obj.str.isdecimal(
    )  # type: ignore
elif hasattr(pc, "utf8_is_alnum"):
    TextAccessor.isalnum = lambda self: self._series_like(  # type: ignore
        pc.utf8_is_alnum(self.data))
    TextAccessor.isalpha = lambda self: self._series_like(  # type: ignore
        pc.utf8_is_alpha(self.data))
    TextAccessor.isdigit = lambda self: self._series_like(  # type: ignore
        pc.utf8_is_digit(self.data))
    TextAccessor.islower = lambda self: self._series_like(  # type: ignore
        pc.utf8_is_lower(self.data))
    TextAccessor.isupper = lambda self: self._series_like(  # type: ignore
        pc.utf8_is_upper(self.data))
    TextAccessor.istitle = lambda self: self._series_like(  # type: ignore
        pc.utf8_is_title(self.data))
    TextAccessor.isnumeric = lambda self: self._series_like(  # type: ignore
        pc.utf8_is_numeric(self.data))
    TextAccessor.isdecimal = lambda self: self._series_like(  # type: ignore
        pc.utf8_is_decimal(self.data))
    # This one was added later
    if hasattr(pc, "utf8_is_space"):
        TextAccessor.isspace = lambda self: self._series_like(  # type: ignore
            pc.utf8_is_space(self.data))