vastorbit.VastColumn.drop¶
- VastColumn.drop(add_history: bool = True) VastFrame¶
Drops the VastColumn from the VastFrame. Dropping a VastColumn means it is not selected in the final generated SQL code.
Warning
Dropping a VastColumn can make the VastFrame “heavier” if it is used to compute other VastColumns.
- Parameters:
add_history (bool, optional) – If set to True, the information is stored in the VastFrame history.
- Returns:
self._parent
- Return type:
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.For this example, we will use a dummy dataset with three columns:
vdf = vo.VastFrame( { "col1": [1, 2, 3], "col2": [3, 3, 1], "col":['a', 'b', 'v'], }, )
123col1Integer123col2IntegerAbccolVarchar(1)1 3 1 v 2 2 3 b 3 1 3 a Rows: 1-3 | Columns: 3Note
vastorbit offers a wide range of sample datasets that are ideal for training and testing purposes. You can explore the full list of available datasets in the Datasets, which provides detailed information on each dataset and how to use them effectively. These datasets are invaluable resources for honing your data analysis and machine learning skills within the vastorbit environment.
Using
dropwe can take out any column that we do not need:vdf["col1"].drop()
123col2IntegerAbccolVarchar(1)1 3 b 2 3 a 3 1 v Rows: 1-3 | Columns: 2See also
VastColumn.drop(): Drops the input VastColumn.VastFrame.drop_duplicates(): Drops the VastFrame duplicates.