vastorbit.core.tablesample.base.TableSample.category¶
- TableSample.category(column: str) Literal['bool', 'date', 'real', 'int', 'undefined', 'text']¶
Returns the category of data in a specified
TableSamplecolumn.- Parameters:
column (str) –
TableSamplecolumn.- Returns:
Category of the specified column.
- Return type:
Literal
Examples
Let’s import the
TableSampleobject: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_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 use the function.
# Example1. tb.category('name') # Example2. tb.category('age')
See also