turicreate.SFrame.remove_column

SFrame.remove_column(self, column_name, inplace=False)

Returns an SFrame with a column 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_name : string

The name of the column to remove.

inplace : bool, optional. Defaults to False.

Whether the SFrame is modified in place.

Returns:
out : SFrame

The SFrame with given column removed.

Examples

>>> sf = turicreate.SFrame({'id': [1, 2, 3], 'val': ['A', 'B', 'C']})
>>> # This is equivalent to `del sf['val']`
>>> res = sf.remove_column('val')
>>> res
+----+
| id |
+----+
| 1  |
| 2  |
| 3  |
+----+
[3 rows x 1 columns]