rnalysis.filtering.Pipeline.add_function

Pipeline.add_function(func: LambdaType | str, *args, **kwargs)

Add a function to the pipeline. Arguments can be stated with or without the correspoding keywords. For example: Pipeline.add_function(‘sort’, ‘columnName’, ascending=False, na_position=’first’). Pipelines support virtually all functions in the filtering module, including filtering functions, normalization functions, splitting functions and plotting functions. Do not include the ‘inplace’ argument when adding functions to a pipeline; instead, include it when applying the pipeline to a Filter object using Pipeline.apply_to(). :param func: function to be added :type func: function or name of function from the filtering module :param args: unkeyworded arguments for the added function in their natural order. For example: 0.1, True :param kwargs: keyworded arguments for the added function. For example: opposite=True

Examples:
>>> from rnalysis import filtering
>>> pipe = filtering.Pipeline()
>>> pipe.add_function(filtering.Filter.filter_missing_values)
Added function 'Filter.filter_missing_values()' to the pipeline.
>>> pipe.add_function('number_filters', 'col1', 'greater than', value=5, opposite=True)
Added function 'Filter.number_filters('col1', 'greater than', value=5, opposite=True)' to the pipeline.