rnalysis.filtering.CountFilter.transformο
- CountFilter.transform(function: Literal['Box-Cox', 'log2', 'log10', 'ln', 'Standardize'] | Callable, columns: ColumnNames | Literal['all'] = 'all', inplace: bool = True, **function_kwargs)ο
Transform the values in the Filter object with the specified function.
- Parameters:
function (Callable or str ('logx' for base-x log of the data + 1, 'box-cox' for Box-Cox transform of the data + 1, 'standardize' for standardization)) β The function or function name to be applied.
columns (str, list of str, or 'all' (default='all')) β The columns to which the transform should be applied.
inplace (bool (default=True)) β If True (default), filtering will be applied to the current Filter object. If False, the function will return a new Filter instance and the current instance will not be affected.
function_kwargs β Any additional keyworded arguments taken by the supplied function.
- Returns:
If βinplaceβ is False, returns a new instance of the Filter object.
- Examples:
>>> from rnalysis import filtering >>> filt = filtering.Filter('tests/test_files/counted.csv') >>> filt_log10 = filt.transform('log10', inplace=False) Transformed 22 features. Transformation result saved to new object. >>> filt.transform(lambda x: x+1, columns=['cond1','cond4']) Transformed 22 features. Transformed inplace.