verticapy.core.tablesample.base.TableSample.append#
- TableSample.append(tbs: TableSample) TableSample #
Appends the input
TableSample
to a targetTableSample
.Parameters#
- tbs: TableSample
TableSample
to append.
Returns#
- TableSample
self
Examples#
Let’s import the
TableSample
object:from verticapy import TableSample
Let’s build an example object.
# dict with all the data. d = { "customer_ID": [0, 1, 2, 3], "age": [40, 30, 22, 55], "name": ['Roger', 'Maria', 'Alisia', 'Costi'], } # creating the object. tb = TableSample(d)
customer_ID age name 1 0 40 Roger 2 1 30 Maria 3 2 22 Alisia 4 3 55 Costi Rows: 1-4 | Columns: 3Let’s build a second object example.
# dict with all the data. d = { "customer_ID": [4, 5], "age": [33, 66], "name": ['Vanesa', 'Antony'], } # creating the object. tb2 = TableSample(d)
customer_ID age name 1 4 33 Vanesa 2 5 66 Antony Rows: 1-2 | Columns: 3Let’s use the function.
tb.append(tb2)
customer_ID age name 1 0 40 Roger 2 1 30 Maria 3 2 22 Alisia 4 3 55 Costi 5 4 33 Vanesa 6 5 66 Antony Rows: 1-6 | Columns: 3Warning
This will modify the main object, and the input
TableSample
will be appended to it.See also