(left, right)
return None
Function for joining arrays left and right in a way similar to pandas.join 'outer' algorithm
Function for joining arrays left and right in a way similar to pandas.join 'outer' algorithm
Function for joining arrays left and right in a way similar to pandas . join outer algorithm
def pd_indexes_join_overload(left, right):
    """Function for joining arrays left and right in a way similar to pandas.join 'outer' algorithm"""

    # check that both operands are of types used for representing Pandas indexes
    if not (isinstance(left, sdc_pandas_index_types) and isinstance(right, sdc_pandas_index_types)
            and not isinstance(left, EmptyIndexType)
            and not isinstance(right, EmptyIndexType)):
        return None

    # for index types with dtype=int64 resulting index should be of Int64Index type
    if (isinstance(left, (PositionalIndexType, RangeIndexType, Int64IndexType))
            and isinstance(right, (PositionalIndexType, RangeIndexType, Int64IndexType))):

        def _convert_to_arrays_impl(left, right):

            if (left is right or left.equals(right)):
                return pd.Int64Index(left.values), None, None

            joined_data, indexer1, indexer2 = _sdc_internal_join(left.values, right.values)
            return pd.Int64Index(joined_data), indexer1, indexer2

        return _convert_to_arrays_impl

    # for joining with deprecated types.Array indexes (e.g. representing UInt64Index)
    # resulting index will be of numpy array type. TO-DO: remove once pd.Index overload
    # is supported and all indexes are represented with distinct types
    else:
        convert_left = isinstance(left, (PositionalIndexType, RangeIndexType, Int64IndexType))
        convert_right = isinstance(right, (PositionalIndexType, RangeIndexType, Int64IndexType))
        index_dtypes_match, res_index_dtype = find_index_common_dtype(left, right)

        def pd_indexes_join_array_indexes_impl(left, right):

            _left = left.values if convert_left == True else left  # noqa
            _right = right.values if convert_right == True else right  # noqa
            if (_left is _right
                    or numpy_like.array_equal(_left, _right)):
                if index_dtypes_match == False:  # noqa
                    joined_index = numpy_like.astype(_left, res_index_dtype)
                else:
                    joined_index = _left
                return joined_index, None, None

            return _sdc_internal_join(_left, _right)

        return pd_indexes_join_array_indexes_impl

    return None
def pd_indexes_join_overload ( left , right ) : # check that both operands are of types used for representing Pandas indexes if not ( isinstance ( left , sdc_pandas_index_types ) and isinstance ( right , sdc_pandas_index_types ) and not isinstance ( left , EmptyIndexType ) and not isinstance ( right , EmptyIndexType ) ) : return None # for index types with dtype=int64 resulting index should be of Int64Index type if ( isinstance ( left , ( PositionalIndexType , RangeIndexType , Int64IndexType ) ) and isinstance ( right , ( PositionalIndexType , RangeIndexType , Int64IndexType ) ) ) : def _convert_to_arrays_impl ( left , right ) : if ( left is right or left . equals ( right ) ) : return pd . Int64Index ( left . values ) , None , None joined_data , indexer1 , indexer2 = _sdc_internal_join ( left . values , right . values ) return pd . Int64Index ( joined_data ) , indexer1 , indexer2 return _convert_to_arrays_impl # for joining with deprecated types.Array indexes (e.g. representing UInt64Index) # resulting index will be of numpy array type. TO-DO: remove once pd.Index overload # is supported and all indexes are represented with distinct types else : convert_left = isinstance ( left , ( PositionalIndexType , RangeIndexType , Int64IndexType ) ) convert_right = isinstance ( right , ( PositionalIndexType , RangeIndexType , Int64IndexType ) ) index_dtypes_match , res_index_dtype = find_index_common_dtype ( left , right ) def pd_indexes_join_array_indexes_impl ( left , right ) : _left = left . values if convert_left == True else left # noqa _right = right . values if convert_right == True else right # noqa if ( _left is _right or numpy_like . array_equal ( _left , _right ) ) : if index_dtypes_match == False : # noqa joined_index = numpy_like . astype ( _left , res_index_dtype ) else : joined_index = _left return joined_index , None , None return _sdc_internal_join ( _left , _right ) return pd_indexes_join_array_indexes_impl return None