class_docstr: This module applies functions to specified feature and metrics.
  
  Extra parameters (kwargs) can be passed to the apply function.
docstr: Initialize an instance of ApplyFunc.
  
  :param str apply_to_key: key of the input data to apply funcs to.
  :param str assign_to_key: key of the input data to assign function applied-output to. (optional)
  :param str store_key: key of the output data to store in the datastore (optional)
  :param str apply_funcs_key: key of to-be-applied functions in data to store (optional)
  :param list features: list of features to pick up from input data and apply funcs to (optional)
  :param list metrics: list of metrics to apply funcs to (optional)
  :param str msg: message to print out at start of transform function. (optional)
  :param list apply_funcs: functions to apply (list of dicts):
  
    - 'func': function to apply
    - 'suffix' (string, optional): suffix added to each metric. default is function name.
    - 'prefix' (string, optional): prefix added to each metric.
    - 'features' (list, optional): features the function is applied to. Overwrites features above
    - 'metrics' (list, optional): metrics the function is applied to. Overwrites metrics above
    - 'entire' (boolean, optional): apply function to the entire feature's dataframe of metrics?
    - 'args' (tuple, optional): args for 'func'
    - 'kwargs' (dict, optional): kwargs for 'func'
docstr_tok: ["Initialize","an","instance","of","ApplyFunc",".",":","param","str","apply_to_key",":","key","of","the","input","data","to","apply","funcs","to",".",":","param","str","assign_to_key",":","key","of","the","input","data","to","assign","function","applied-output","to",".","(","optional",")",":","param","str","store_key",":","key","of","the","output","data","to","store","in","the","datastore","(","optional",")",":","param","str","apply_funcs_key",":","key","of","to-be-applied","functions","in","data","to","store","(","optional",")",":","param","list","features",":","list","of","features","to","pick","up","from","input","data","and","apply","funcs","to","(","optional",")",":","param","list","metrics",":","list","of","metrics","to","apply","funcs","to","(","optional",")",":","param","str","msg",":","message","to","print","out","at","start","of","transform","function",".","(","optional",")",":","param","list","apply_funcs",":","functions","to","apply","(","list","of","dicts",")",":","-","'func","'",":","function","to","apply","-","'suffix","'","(","string",",","optional",")",":","suffix","added","to","each","metric",".","default","is","function","name",".","-","'prefix","'","(","string",",","optional",")",":","prefix","added","to","each","metric",".","-","'features","'","(","list",",","optional",")",":","features","the","function","is","applied","to",".","Overwrites","features","above","-","'metrics","'","(","list",",","optional",")",":","metrics","the","function","is","applied","to",".","Overwrites","metrics","above","-","'entire","'","(","boolean",",","optional",")",":","apply","function","to","the","entire","feature","'s","dataframe","of","metrics","?","-","'args","'","(","tuple",",","optional",")",":","args","for","'func'","-","'kwargs","'","(","dict",",","optional",")",":","kwargs","for","'func","'"]
code: def __init__(
      self,
      apply_to_key,
      store_key: str = "",
      assign_to_key: str = "",
      apply_funcs_key: str = "",
      features=None,
      apply_funcs=None,
      metrics=None,
      msg: str = "",
  ) -> None:
      """Initialize an instance of ApplyFunc.
  
      :param str apply_to_key: key of the input data to apply funcs to.
      :param str assign_to_key: key of the input data to assign function applied-output to. (optional)
      :param str store_key: key of the output data to store in the datastore (optional)
      :param str apply_funcs_key: key of to-be-applied functions in data to store (optional)
      :param list features: list of features to pick up from input data and apply funcs to (optional)
      :param list metrics: list of metrics to apply funcs to (optional)
      :param str msg: message to print out at start of transform function. (optional)
      :param list apply_funcs: functions to apply (list of dicts):
  
        - 'func': function to apply
        - 'suffix' (string, optional): suffix added to each metric. default is function name.
        - 'prefix' (string, optional): prefix added to each metric.
        - 'features' (list, optional): features the function is applied to. Overwrites features above
        - 'metrics' (list, optional): metrics the function is applied to. Overwrites metrics above
        - 'entire' (boolean, optional): apply function to the entire feature's dataframe of metrics?
        - 'args' (tuple, optional): args for 'func'
        - 'kwargs' (dict, optional): kwargs for 'func'
  
      """
      super().__init__()
      self.apply_to_key = apply_to_key
      self.assign_to_key = assign_to_key or apply_to_key
      self.apply_funcs_key = apply_funcs_key
      self.store_key = store_key or self.assign_to_key
  
      self.features = features or []
      self.metrics = metrics or []
      self.msg = msg
      self.apply_funcs = []
      # import applied functions
      apply_funcs = apply_funcs or []
      for af in apply_funcs:
          self.add_apply_func(**af)
  
file_path: popmon/popmon/analysis/apply_func.py
imports: from __future__ import annotations
  import warnings
  import numpy
  import pandas
  from popmon.base import Module
  from popmon.utils import parallel
label_desc: Use image node_id 1 to create a new ApplyFunc object from inherited base classes: Module with example: obj = ApplyFunc(apply_to_key, store_key, assign_to_key, apply_funcs_key, features, apply_funcs, metrics, msg)