turicreate.SFrame.remove_columns¶
-
SFrame.
remove_columns
(column_names, inplace=False)¶ Returns an SFrame with one or more columns removed.
If inplace == False (default) this operation does not modify the current SFrame, returning a new SFrame.
If inplace == True, this operation modifies the current SFrame, returning self.
Parameters: - column_names : list or iterable
A list or iterable of column names.
- inplace : bool, optional. Defaults to False.
Whether the SFrame is modified in place.
Returns: - out : SFrame
The SFrame with given columns removed.
Examples
>>> sf = turicreate.SFrame({'id': [1, 2, 3], 'val1': ['A', 'B', 'C'], 'val2' : [10, 11, 12]}) >>> res = sf.remove_columns(['val1', 'val2']) >>> res +----+ | id | +----+ | 1 | | 2 | | 3 | +----+ [3 rows x 1 columns]