cycquery.ops.Sequential¶
- class Sequential(*ops: QueryOp)[source]¶
- class Sequential(ops: List[QueryOp])
- class Sequential(op: OrderedDict[str, QueryOp])
Bases:
QueryOp
Sequential query operations class.
Chains a sequence of query operations and executes the final query on a table.
Examples
>>> Sequential(Drop(["col1", "col2"]), ...) >>> Sequential([Drop(["col1", "col2"]), ...])
Initialize the class.
- Parameters:
args (
QueryOp
) – Query operations to be chained sequentially.
Methods
Append a given query op to the end.
Extend the sequential query op with another sequential query op.
Insert a given query op at the given index.
Pop the query op at the given index.
- __add__(other)[source]¶
Add two Sequential objects.
- Parameters:
other (
Sequential
) – Sequential object to be added.- Returns:
Sequential object with the two Sequential objects chained.
- Return type:
- __init__(*args)[source]¶
Initialize the class.
- Parameters:
args (
QueryOp
) – Query operations to be chained sequentially.
- append(op_)[source]¶
Append a given query op to the end.
- Parameters:
op – Query op to append.
- Returns:
Sequential object with the query op appended.
- Return type:
- extend(sequential)[source]¶
Extend the sequential query op with another sequential query op.
- Parameters:
sequential (
Sequential
) – Sequential object to extend with.- Returns:
Sequential object with the other sequential query op extended.
- Return type: