Loading...

vastorbit.core.tablesample.base.TableSample.to_vdf

TableSample.to_vdf() VastFrame

Converts the TableSample to a VastFrame.

Returns:

VastFrame of the TableSample.

Return type:

VastFrame

Examples

Let’s import the TableSample object:

from vastorbit 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_IDagename
1040Roger
2130Maria
3222Alisia
4355Costi
Rows: 1-4 | Columns: 3

Let’s use the function.

tb.to_vdf()
123
customer_ID
Integer
123
age
Integer
Abc
name
Varchar(6)
1222Alisia
2355Costi
3130Maria
4040Roger
Rows: 1-4 | Columns: 3

See also

TableSample.to_sql() : Generates the SQL query associated to the TableSample.