QDFile.del_column

QDFile.del_column(col=None, duplicates=False)

Delete a column from the current DataFile object.

Parameters

col (int, string, iterable of booleans, list or re) – is the column index as defined for DataFile.find_col() to the column to be deleted

Keyword Arguments

duplicates (bool) – (default False) look for duplicated columns

Returns

self – The DataFile object with the column deleted.

Note

  • If duplicates is True and col is None then all duplicate columns are removed,

  • if col is not None and duplicates is True then all duplicates of the specified column are removed.

  • If duplicates is False and col is either None or False then all masked coplumns are deleeted. If

    col is True, then all columns that are not set i the setas attrobute are delted.

  • If col is a list (duplicates should not be None) then the all the matching columns are found.

  • If col is an iterable of booleans, then all columns whose elements are False are deleted.

  • If col is None and duplicates is None, then all columns with at least one elelemtn masked

    will be deleted