(cls, tables, axis=0)
return conc
Concatenate tables into a new table, either vertically or horizontally.

        If axis=0 (vertical concatenate), all tables must have the same domain.

        If axis=1 (horizontal),
        - all variable names must be unique.
        - ids are copied from the first table.
        - weights are copied from the first table in which they are defined.
        - the dictionary of table's attributes are merged. If the same attribute
          appears in multiple dictionaries, the earlier are used.

        Args:
            tables (Table): tables to be joined

        Returns:
            table (Table)
Concatenate tables into a new table, either vertically or horizontally.
Concatenate tables into a new table either vertically or horizontally .
def concatenate(cls, tables, axis=0):
        """
        Concatenate tables into a new table, either vertically or horizontally.

        If axis=0 (vertical concatenate), all tables must have the same domain.

        If axis=1 (horizontal),
        - all variable names must be unique.
        - ids are copied from the first table.
        - weights are copied from the first table in which they are defined.
        - the dictionary of table's attributes are merged. If the same attribute
          appears in multiple dictionaries, the earlier are used.

        Args:
            tables (Table): tables to be joined

        Returns:
            table (Table)
        """
        if axis not in (0, 1):
            raise ValueError("invalid axis")
        if not tables:
            raise ValueError('need at least one table to concatenate')

        if len(tables) == 1:
            return tables[0].copy()

        if axis == 0:
            conc = cls._concatenate_vertical(tables)
        else:
            conc = cls._concatenate_horizontal(tables)

        # TODO: Add attributes = {} to __init__
        conc.attributes = getattr(conc, "attributes", {})
        for table in reversed(tables):
            conc.attributes.update(table.attributes)

        names = [table.name for table in tables if table.name != "untitled"]
        if names:
            conc.name = names[0]
        return conc
def concatenate ( cls , tables , axis = 0 ) : if axis not in ( 0 , 1 ) : raise ValueError ( "invalid axis" ) if not tables : raise ValueError ( 'need at least one table to concatenate' ) if len ( tables ) == 1 : return tables [ 0 ] . copy ( ) if axis == 0 : conc = cls . _concatenate_vertical ( tables ) else : conc = cls . _concatenate_horizontal ( tables ) # TODO: Add attributes = {} to __init__ conc . attributes = getattr ( conc , "attributes" , { } ) for table in reversed ( tables ) : conc . attributes . update ( table . attributes ) names = [ table . name for table in tables if table . name != "untitled" ] if names : conc . name = names [ 0 ] return conc