vastorbit.VastFrame.numcol¶
- VastFrame.numcol(exclude_columns: Annotated[str | list[str], 'STRING representing one column or a list of columns'] | None = None) list¶
Returns a list of names of the numerical VastColumns in the VastFrame.
- Parameters:
exclude_columns (SQLColumns, optional) – List of the VastColumns names to exclude from the final list.
- Returns:
List of numerical VastColumns names.
- Return type:
List
Examples
We import
vastorbit:import vastorbit as vo
Hint
By assigning an alias to
vastorbit, we mitigate the risk of code collisions with other libraries. This precaution is necessary because vastorbit uses commonly known function names like “average” and “median”, which can potentially lead to naming conflicts. The use of an alias ensures that the functions fromvastorbitare used as intended without interfering with functions from other libraries.Let’s create a small dataset:
data = vo.VastFrame( { "empid": ['1', '2', '3', '4'], "weight": [140.5, 175, 156.5, 178], "height": [168.5, 175, 178.5, 170], "emp_cat":[933, 945, 723, 799], } ) data
AbcempidVarchar(1)123weightDecimal(11, 1)123heightDecimal(11, 1)123emp_catInteger1 1 140.5 168.5 933 2 2 175.0 175.0 945 3 3 156.5 178.5 723 4 4 178.0 170.0 799 Rows: 1-4 | Columns: 4Let’s retrieve the numeric type VastColumns in the dataset.
data.numcol()
See also
VastFrame.catcol(): Returns all VastColumns with categorical values.VastFrame.datecol(): Returns all VastColumns with date-type values.VastFrame.get_columns(): Returns all VastColumns.