Stack tables vertically (along rows)
A join_type of ‘exact’ means that the tables must all have exactly the same column names (though the order can vary). If join_type is ‘inner’ then the intersection of common columns will be output. A value of ‘outer’ (default) means the output will have the union of all columns, with table values being masked where no common values are available.
Parameters: | tables : Table or list of Table objects
join_type : str
metadata_conflicts : str
|
---|
Examples
To stack two tables along rows do:
>>> from astropy.table import vstack, Table
>>> t1 = Table({'a': [1, 2], 'b': [3, 4]}, names=('a', 'b'))
>>> t2 = Table({'a': [5, 6], 'b': [7, 8]}, names=('a', 'b'))
>>> print(t1)
a b
--- ---
1 3
2 4
>>> print(t2)
a b
--- ---
5 7
6 8
>>> print(vstack([t1, t2]))
a b
--- ---
1 3
2 4
5 7
6 8