cycquery.ops.AddDeltaColumn¶
- class AddDeltaColumn(add_to, negative=False, new_col_labels=None, **delta_kwargs)[source]¶
- Bases: - QueryOp- Construct and add an interval column to some columns. - Parameters:
- add_to ( - Union[- str,- List[- str]]) – Column names specifying to which columns is being added.
- negative ( - Optional[- bool]) – Subtract the object rather than adding.
- new_col_labels ( - Union[- str,- List[- str],- None]) – If specified, create new columns with these labels. Otherwise, apply the function to the existing columns.
- **delta_kwargs ( - Any) – The arguments used to create the Interval column.
 
 - Examples - >>> AddDeltaColumn("col1", "col2")(table) >>> AddDeltaColumn(["col1", "col2"], "col3")(table) >>> AddDeltaColumn("col1", "col2", negative=True)(table) >>> AddDeltaColumn("col1", "col2", "col1_plus_col2")(table) - Initialize the operation. - Methods