NumberGroupsOp

class NumberGroupsOp(parameters)[source]

Implementation in progress.

Methods

NumberGroupsOp.__init__(parameters)

Constructor for the BaseOp class.

NumberGroupsOp.do_op(dispatcher, df, name[, ...])

Add numbers to groups of events in dataframe.

NumberGroupsOp.validate_input_data(parameters)

Additional validation required of operation parameters not performed by JSON schema validator.

Attributes

NumberGroupsOp.NAME

NumberGroupsOp.PARAMS

NumberGroupsOp.__init__(parameters)[source]

Constructor for the BaseOp class. Should be extended by operations.

Parameters:

parameters (dict) – A dictionary specifying the appropriate parameters for the operation.

NumberGroupsOp.do_op(dispatcher, df, name, sidecar=None)[source]

Add numbers to groups of events in dataframe.

Parameters:
  • dispatcher (Dispatcher) – Manages the 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.

static NumberGroupsOp.validate_input_data(parameters)[source]

Additional validation required of operation parameters not performed by JSON schema validator.

NumberGroupsOp.NAME = 'number_groups'
NumberGroupsOp.PARAMS = {'additionalProperties': False, 'properties': {'number_column_name': {'type': 'string'}, 'overwrite': {'type': 'boolean'}, 'source_column': {'type': 'string'}, 'start': {'additionalProperties': False, 'properties': {'inclusion': {'enum': ['include', 'exclude'], 'type': 'string'}, 'values': {'type': 'array'}}, 'required': ['values', 'inclusion'], 'type': 'object'}, 'stop': {'additionalProperties': False, 'properties': {'inclusion': {'enum': ['include', 'exclude'], 'type': 'string'}, 'values': {'type': 'array'}}, 'required': ['values', 'inclusion'], 'type': 'object'}}, 'required': ['number_column_name', 'source_column', 'start', 'stop'], 'type': 'object'}