Length of each element in the current SArray.

        Only works on SArrays of dict, array, or list type. If a given element
        is a missing value, then the output elements is also a missing value.
        This function is equivalent to the following but more performant:

            sa_item_len =  sa.apply(lambda x: len(x) if x is not None else None)

        Returns
        -------
        out_sf : SArray
            A new SArray, each element in the SArray is the len of the corresponding
            items in original SArray.

        Examples
        --------
        >>> sa = SArray([
        ...  {"is_restaurant": 1, "is_electronics": 0},
        ...  {"is_restaurant": 1, "is_retail": 1, "is_electronics": 0},
        ...  {"is_restaurant": 0, "is_retail": 1, "is_electronics": 0},
        ...  {"is_restaurant": 0},
        ...  {"is_restaurant": 1, "is_electronics": 1},
        ...  None])
        >>> sa.item_length()
        dtype: int
        Rows: 6
        [2, 3, 3, 1, 2, None]

def item_length(self):
        """
        Length of each element in the current SArray.

        Only works on SArrays of dict, array, or list type. If a given element
        is a missing value, then the output elements is also a missing value.
        This function is equivalent to the following but more performant:

            sa_item_len =  sa.apply(lambda x: len(x) if x is not None else None)

        Returns
        -------
        out_sf : SArray
            A new SArray, each element in the SArray is the len of the corresponding
            items in original SArray.

        Examples
        --------
        >>> sa = SArray([
        ...  {"is_restaurant": 1, "is_electronics": 0},
        ...  {"is_restaurant": 1, "is_retail": 1, "is_electronics": 0},
        ...  {"is_restaurant": 0, "is_retail": 1, "is_electronics": 0},
        ...  {"is_restaurant": 0},
        ...  {"is_restaurant": 1, "is_electronics": 1},
        ...  None])
        >>> sa.item_length()
        dtype: int
        Rows: 6
        [2, 3, 3, 1, 2, None]
        """
        if (self.dtype not in [list, dict, array.array]):
            raise TypeError("item_length() is only applicable for SArray of type list, dict and array.")


        with cython_context():
            return SArray(_proxy = self.__proxy__.item_length())