maxframe.liteframe.LiteFrame.drop#

LiteFrame.drop(columns, errors='raise')#

Drop columns from LiteFrame.

Removes the specified columns and returns a LiteFrame over the remaining columns. Hidden columns named in columns are also dropped. Row order is preserved.

Parameters:
  • columns (str or list of str) – Column name(s) to drop.

  • errors ({"raise", "ignore"}, default "raise") – When "raise", a KeyError is raised for unknown columns; when "ignore", unknown columns are silently skipped.

Returns:

LiteFrame with the specified columns removed.

Return type:

LiteFrame

See also

LiteFrame.select

Explicit column selection.

Examples

>>> import maxframe.liteframe as mlf
>>> lf = mlf.LiteFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
>>> result = lf.drop(columns=['a'])
>>> result.execute()
   b
0  4
1  5
2  6