swat.cas.table.CASTable.drop

CASTable.drop(self, labels, axis=0, level=None, inplace=False, errors='raise')

Return a new CASTable object with the specified columns removed

Parameters
labelsstring or list-of-strings

The items to remove.

axisint, optional

Only axis=1 is supported.

levelint or string, optional

Not implemented.

inplaceboolean, optional

If True, apply the operation in place and return None.

errorsstring, optional

If ‘raise’, then an exception is raised if the requested labels do not exist. If ‘ignore’, any errors are ignored.

Returns
None

If inplace == True

CASTable

If inplace == False

Examples

>>> tbl = CASTable('my-table')
>>> print(tbl.columns)
Index(['A', 'B', 'C'], dtype='object')
>>> tbl = tbl.drop(['B', 'C'], axis=1)
>>> print(tbl.columns)
Index(['A'], dtype='object')