NumberRowsOp¶
- class NumberRowsOp(parameters)[source]
Implementation in progress.
Methods
|
Base class constructor for operations. |
|
Verify that the parameters meet the operation specification. |
|
Add numbers events dataframe. |
Attributes
|
- NumberRowsOp.__init__(parameters)[source]¶
Base class constructor for operations.
- Parameters:
op_spec (dict) – Specification for required and optional parameters.
parameters (dict) – Actual values of the parameters for the operation.
- Raises:
KeyError –
If a required parameter is missing.
If an unexpected parameter is provided.
TypeError –
If a parameter has the wrong type.
ValueError –
If the specification is missing a valid operation.
- NumberRowsOp.check_parameters(parameters)¶
Verify that the parameters meet the operation specification.
- Parameters:
parameters (dict) – Dictionary of parameters for this operation.
- Raises:
KeyError –
If a required parameter is missing.
If an unexpected parameter is provided.
TypeError –
If a parameter has the wrong type.
- NumberRowsOp.do_op(dispatcher, df, name, sidecar=None)[source]¶
Add numbers events dataframe.
- Parameters:
dispatcher (Dispatcher) – Manages operation I/O.
df (DataFrame) –
The DataFrame to be remodeled.
name (str) –
Unique identifier for the dataframe – often the original file path.
sidecar (Sidecar or file-like) – Only needed for HED operations.
- Returns:
Dataframe - a new dataframe after processing.
- NumberRowsOp.PARAMS = {'operation': 'number_rows', 'optional_parameters': {'match_value': <class 'dict'>, 'overwrite': <class 'bool'>}, 'required_parameters': {'number_column_name': <class 'str'>}}¶