(self, other)
return None
Additional overload of operator.add for Series of strings.
    For generic overload see - autogenerated one in sdc_autogenerated.py
Additional overload of operator.add for Series of strings.
    For generic overload see - autogenerated one in sdc_autogenerated.py
Additional overload of operator . add for Series of strings . For generic overload see - autogenerated one in sdc_autogenerated . py
def sdc_pandas_str_series_operator_add(self, other):
    """
    Additional overload of operator.add for Series of strings.
    For generic overload see - autogenerated one in sdc_autogenerated.py
    """

    _func_name = 'Operator add().'

    ty_checker = TypeChecker('Operator add().')
    self_is_series, other_is_series = isinstance(self, SeriesType), isinstance(other, SeriesType)
    if not (self_is_series or other_is_series):
        return None

    # this overload is for string series only (so check that at least one is series of strings)
    self_is_string_series = self_is_series and isinstance(self.dtype, types.UnicodeType)
    other_is_string_series = other_is_series and isinstance(other.dtype, types.UnicodeType)
    if not (self_is_string_series or other_is_string_series):
        return None

    if not isinstance(self, (SeriesType, types.Number, types.UnicodeType)):
        ty_checker.raise_exc(self, 'pandas.series or string', 'self')

    if not isinstance(other, (SeriesType, types.Number, types.UnicodeType)):
        ty_checker.raise_exc(other, 'pandas.series or string', 'other')

    operands_are_series = self_is_series and other_is_series
    if operands_are_series:
        series_indexes_comparable = check_types_comparable(self.index, other.index)
        if not series_indexes_comparable:
            raise TypingError('{} Not implemented for series with not-comparable indexes. \
            Given: self.index={}, other.index={}'.format(_func_name, self.index, other.index))

    series_data_comparable = check_types_comparable(self, other)
    if not series_data_comparable:
        raise TypingError('{} Not supported for not-comparable operands. \
        Given: self={}, other={}'.format(_func_name, self, other))

    if not operands_are_series:
        def _series_operator_add_scalar_impl(self, other):
            if self_is_series == True:  # noqa
                result_data = self._data + other
                return pandas.Series(result_data, index=self._index, name=self._name)
            else:
                result_data = self + other._data
                return pandas.Series(result_data, index=other._index, name=other._name)

        return _series_operator_add_scalar_impl
    else:   # both operands are string series

        # TO-DO: None indexes branch is dead code, remove?
        if (isinstance(self.index, PositionalIndexType) and isinstance(other.index, PositionalIndexType)):
            def _series_operator_add_none_indexes_impl(self, other):

                if (len(self._data) == len(other._data)):
                    result_data = self._data + other._data
                    return pandas.Series(result_data)
                else:
                    left_size, right_size = len(self._data), len(other._data)
                    min_data_size = min(left_size, right_size)
                    max_data_size = max(left_size, right_size)

                    result_data_as_list = []
                    result_nan_mask = numpy.zeros(max_data_size, dtype=numpy.bool_)
                    result_nan_mask[min_data_size:] = True
                    for i in numpy.arange(min_data_size):
                        if str_arr_is_na(self._data, i) or str_arr_is_na(other._data, i):
                            result_nan_mask[i] = True
                            result_data_as_list.append('')
                        else:
                            result_data_as_list.append(self._data[i] + other._data[i])
                    result_data_as_list.extend([''] * (max_data_size - min_data_size))
                    result_data = create_str_arr_from_list(result_data_as_list)
                    str_arr_set_na_by_mask(result_data, result_nan_mask)

                    return pandas.Series(result_data, self._index)

            return _series_operator_add_none_indexes_impl
        else:

            index_api_supported = not (isinstance(self.index, sdc_old_index_types)
                                       or isinstance(other.index, sdc_old_index_types))

            def _series_operator_add_str_impl(self, other):
                left_index, right_index = self._index, other._index
                if index_api_supported == True:  # noqa
                    indexes_join_res = left_index.join(right_index, 'outer', return_indexers=True)
                else:
                    indexes_join_res = sdc_indexes_join_outer(left_index, right_index)

                # FIXME_Numba#6686: remove sdc_fix_indexes_join call at all when issue is fixed
                joined_index, left_indexer, right_indexer = sdc_fix_indexes_join(*indexes_join_res)
                result_size = len(joined_index)
                result_nan_mask = numpy.zeros(result_size, dtype=numpy.bool_)
                result_data_as_list = []
                for i in numpy.arange(result_size):
                    if (left_indexer[i] == -1
                            or right_indexer[i] == -1
                            or str_arr_is_na(self._data, left_indexer[i])
                            or str_arr_is_na(other._data, right_indexer[i])):
                        result_nan_mask[i] = True
                        result_data_as_list.append('')
                    else:
                        result_data_as_list.append(self._data[left_indexer[i]] + other._data[right_indexer[i]])

                result_data = create_str_arr_from_list(result_data_as_list)
                str_arr_set_na_by_mask(result_data, result_nan_mask)

                return pandas.Series(result_data, joined_index)

            return _series_operator_add_str_impl

    return None
def sdc_pandas_str_series_operator_add ( self , other ) : _func_name = 'Operator add().' ty_checker = TypeChecker ( 'Operator add().' ) self_is_series , other_is_series = isinstance ( self , SeriesType ) , isinstance ( other , SeriesType ) if not ( self_is_series or other_is_series ) : return None # this overload is for string series only (so check that at least one is series of strings) self_is_string_series = self_is_series and isinstance ( self . dtype , types . UnicodeType ) other_is_string_series = other_is_series and isinstance ( other . dtype , types . UnicodeType ) if not ( self_is_string_series or other_is_string_series ) : return None if not isinstance ( self , ( SeriesType , types . Number , types . UnicodeType ) ) : ty_checker . raise_exc ( self , 'pandas.series or string' , 'self' ) if not isinstance ( other , ( SeriesType , types . Number , types . UnicodeType ) ) : ty_checker . raise_exc ( other , 'pandas.series or string' , 'other' ) operands_are_series = self_is_series and other_is_series if operands_are_series : series_indexes_comparable = check_types_comparable ( self . index , other . index ) if not series_indexes_comparable : raise TypingError ( '{} Not implemented for series with not-comparable indexes. \
            Given: self.index={}, other.index={}' . format ( _func_name , self . index , other . index ) ) series_data_comparable = check_types_comparable ( self , other ) if not series_data_comparable : raise TypingError ( '{} Not supported for not-comparable operands. \
        Given: self={}, other={}' . format ( _func_name , self , other ) ) if not operands_are_series : def _series_operator_add_scalar_impl ( self , other ) : if self_is_series == True : # noqa result_data = self . _data + other return pandas . Series ( result_data , index = self . _index , name = self . _name ) else : result_data = self + other . _data return pandas . Series ( result_data , index = other . _index , name = other . _name ) return _series_operator_add_scalar_impl else : # both operands are string series # TO-DO: None indexes branch is dead code, remove? if ( isinstance ( self . index , PositionalIndexType ) and isinstance ( other . index , PositionalIndexType ) ) : def _series_operator_add_none_indexes_impl ( self , other ) : if ( len ( self . _data ) == len ( other . _data ) ) : result_data = self . _data + other . _data return pandas . Series ( result_data ) else : left_size , right_size = len ( self . _data ) , len ( other . _data ) min_data_size = min ( left_size , right_size ) max_data_size = max ( left_size , right_size ) result_data_as_list = [ ] result_nan_mask = numpy . zeros ( max_data_size , dtype = numpy . bool_ ) result_nan_mask [ min_data_size : ] = True for i in numpy . arange ( min_data_size ) : if str_arr_is_na ( self . _data , i ) or str_arr_is_na ( other . _data , i ) : result_nan_mask [ i ] = True result_data_as_list . append ( '' ) else : result_data_as_list . append ( self . _data [ i ] + other . _data [ i ] ) result_data_as_list . extend ( [ '' ] * ( max_data_size - min_data_size ) ) result_data = create_str_arr_from_list ( result_data_as_list ) str_arr_set_na_by_mask ( result_data , result_nan_mask ) return pandas . Series ( result_data , self . _index ) return _series_operator_add_none_indexes_impl else : index_api_supported = not ( isinstance ( self . index , sdc_old_index_types ) or isinstance ( other . index , sdc_old_index_types ) ) def _series_operator_add_str_impl ( self , other ) : left_index , right_index = self . _index , other . _index if index_api_supported == True : # noqa indexes_join_res = left_index . join ( right_index , 'outer' , return_indexers = True ) else : indexes_join_res = sdc_indexes_join_outer ( left_index , right_index ) # FIXME_Numba#6686: remove sdc_fix_indexes_join call at all when issue is fixed joined_index , left_indexer , right_indexer = sdc_fix_indexes_join ( * indexes_join_res ) result_size = len ( joined_index ) result_nan_mask = numpy . zeros ( result_size , dtype = numpy . bool_ ) result_data_as_list = [ ] for i in numpy . arange ( result_size ) : if ( left_indexer [ i ] == - 1 or right_indexer [ i ] == - 1 or str_arr_is_na ( self . _data , left_indexer [ i ] ) or str_arr_is_na ( other . _data , right_indexer [ i ] ) ) : result_nan_mask [ i ] = True result_data_as_list . append ( '' ) else : result_data_as_list . append ( self . _data [ left_indexer [ i ] ] + other . _data [ right_indexer [ i ] ] ) result_data = create_str_arr_from_list ( result_data_as_list ) str_arr_set_na_by_mask ( result_data , result_nan_mask ) return pandas . Series ( result_data , joined_index ) return _series_operator_add_str_impl return None