Concatenates another DataFrame as #concat.
 Additionally it tries to preserve the index. If the indices contain
 common elements, #union will overwrite the according rows in the
 first dataframe.
437193
def union other_df
      index = (@index.to_a + other_df.index.to_a).uniq
      df = row[*(@index.to_a - other_df.index.to_a)]

      df = df.concat(other_df)
      df.index = Daru::Index.new(index)
      df
    end
594220
public static <T> Iterable<T> concat(Iterable<? extends T> a, Iterable<? extends T> b) {
      return concat(Arrays.asList(a, b));
    }
928540
def p_concat_list(p):
    
    if p[1].__class__ == node.expr_list:
        p[0] = node.concat_list([p[1], p[3]])
    else:
        p[0] = p[1]
        p[0].append(p[3])
827012
def merge(bedfiles):
    
    if isinstance(bedfiles, list):
        catted = concat(bedfiles)
    else:
        catted = concat([bedfiles])
    if catted:
        return concat(bedfiles).sort().merge()
    else:
        return catted
871218
def merge_dfs(dfs, resample=None, do_mean=False, do_sum=False, do_min=False, do_max=False):
    
    if len(dfs) == 0:
        raise Exception("No dataframes provided")
    df = dfs.values()[0]
    name = dfs.keys()[0]
    df.columns = map(lambda x: name+"_"+x if not x.startswith(name) else x, df.columns)
    if resample is not None:
        df = df.resample(resample)
        if do_mean: df = df.mean()
        elif do_sum: df = df.sum()
        elif do_min: df = df.min()
        elif do_max: df = df.max()
        else: df = df.mean()
    if len(dfs) > 1:
        for name, newdf in dfs.items()[1:]:
            if resample is not None:
                newdf = newdf.resample(resample)
                if do_mean: newdf = newdf.mean()
                elif do_sum: newdf = newdf.sum()
                elif do_min: newdf = newdf.min()
                elif do_max: newdf = newdf.max()
                else: newdf = newdf.mean()
            newdf.columns = map(lambda x: name+"_"+x if not x.startswith(name) else x, newdf.columns)
            df = df.merge(newdf, left_index=True, right_index=True, how='outer')
    return df
1259849
def concat(row)
      row = Workbook::Row.new(row) unless row.class == Workbook::Row
      super(row)
    end
527432
final public void Concatenation() throws ParseException {
    Math();
    label_11:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case CONCAT:
        ;
        break;
      default:
        jj_la1[24] = jj_gen;
        break label_11;
      }
      jj_consume_token(CONCAT);
                    AstConcatenation jjtn001 = new AstConcatenation(JJTCONCATENATION);
                    boolean jjtc001 = true;
                    jjtree.openNodeScope(jjtn001);
      try {
        Math();
      } catch (Throwable jjte001) {
                    if (jjtc001) {
                      jjtree.clearNodeScope(jjtn001);
                      jjtc001 = false;
                    } else {
                      jjtree.popNode();
                    }
                    if (jjte001 instanceof RuntimeException) {
                      {if (true) throw (RuntimeException)jjte001;}
                    }
                    if (jjte001 instanceof ParseException) {
                      {if (true) throw (ParseException)jjte001;}
                    }
                    {if (true) throw (Error)jjte001;}
      } finally {
                    if (jjtc001) {
                      jjtree.closeNodeScope(jjtn001,  2);
                    }
      }
    }
  }
1048279
def append(self, vals: list, index=None):
        
        try:
            self.df = self.df.loc[len(self.df.index)] = vals
        except Exception as e:
            self.err(e, self.append, "Can not append row")
            return
        self.ok("Row added to dataframe")
1191625
def merge(self, other):
        
        
        for key in other.keys():
            if key not in self:
                # copies over both lower and higher dimensional data
                self[key] = other[key]
642947
public static void concatRows(DMatrixRMaj a , DMatrixRMaj b , DMatrixRMaj output ) {
        int rows = a.numRows + b.numRows;
        int cols = Math.max(a.numCols , b.numCols);

        output.reshape(rows,cols);
        output.zero();

        insert(a,output,0,0);
        insert(b,output,a.numRows,0);
    }
1017127
def _perform_merge(self, other):
        
        if len(other.value) > len(self.value):
            self.value = other.value[:]
        return True
1010418
def Concat(self: Iterable, *others):
    
    return concat_generator(self, *[unbox_if_flow(other) for other in others])
459371
def merge_indexes(
        indexes,  # type: Dict[Any, Union[Any, List[Any]]]
        variables,  # type: Dict[Any, Variable]
        coord_names,  # type: Set
        append=False,  # type: bool
):
    # type: (...) -> Tuple[OrderedDict[Any, Variable], Set]
    
    vars_to_replace = {}  # Dict[Any, Variable]
    vars_to_remove = []  # type: list

    for dim, var_names in indexes.items():
        if isinstance(var_names, str):
            var_names = [var_names]

        names, codes, levels = [], [], []  # type: (list, list, list)
        current_index_variable = variables.get(dim)

        for n in var_names:
            var = variables[n]
            if (current_index_variable is not None and
                    var.dims != current_index_variable.dims):
                raise ValueError(
                    "dimension mismatch between %r %s and %r %s"
                    % (dim, current_index_variable.dims, n, var.dims))

        if current_index_variable is not None and append:
            current_index = current_index_variable.to_index()
            if isinstance(current_index, pd.MultiIndex):
                try:
                    current_codes = current_index.codes
                except AttributeError:
                    # fpr pandas<0.24
                    current_codes = current_index.labels
                names.extend(current_index.names)
                codes.extend(current_codes)
                levels.extend(current_index.levels)
            else:
                names.append('%s_level_0' % dim)
                cat = pd.Categorical(current_index.values, ordered=True)
                codes.append(cat.codes)
                levels.append(cat.categories)

        if not len(names) and len(var_names) == 1:
            idx = pd.Index(variables[var_names[0]].values)

        else:
            for n in var_names:
                names.append(n)
                var = variables[n]
                cat = pd.Categorical(var.values, ordered=True)
                codes.append(cat.codes)
                levels.append(cat.categories)

            idx = pd.MultiIndex(levels, codes, names=names)

        vars_to_replace[dim] = IndexVariable(dim, idx)
        vars_to_remove.extend(var_names)

    new_variables = OrderedDict([(k, v) for k, v in variables.items()
                                 if k not in vars_to_remove])
    new_variables.update(vars_to_replace)
    new_coord_names = coord_names | set(vars_to_replace)
    new_coord_names -= set(vars_to_remove)

    return new_variables, new_coord_names
211908
def concat(self, one, two):
        """"""
        if not len(one) == len(two) == 6:
            raise ValueError("bad sequ. length")
        self.a, self.b, self.c, self.d, self.e, self.f = TOOLS._concat_matrix(one, two)
        return self
841345
function foo (jointName, keyframe, jointParents, keyframeJointMatrices) {
  var jointMatrix = keyframeJointMatrices[keyframe][jointName]
  var parentJointName = jointParents[jointName].parent
  if (parentJointName) {
    return [jointMatrix].concat(foo(parentJointName, keyframe, jointParents, keyframeJointMatrices))
  }
  return [jointMatrix]
}
390359
def union(*sets, **kwargs):
    
    sets = _set_preprocess(sets, **kwargs)
    return as_index( _set_concatenate(sets), axis=0, base=True).unique
1279375
def concat_namedtuples(*tup, **kwargs):
    '''
    
    '''
    name = kwargs['name'] if 'name' in kwargs else None

    # filter out empty elements
    filtered = [i for i in filter(None, tup)]
    if filtered:
        if len(filtered) == 1:
            return filtered[0]
        else:
            fields = chain(*(t._fields for t in filtered))
            values = chain(*(t for t in filtered))
            if not name:
                name = 'SDMXNamedTuple'
            ConcatType = namedtuple_factory(name, fields)
            return ConcatType(*values)
    else:
        return ()