cf_vec

hhpy.main.cf_vec(x: Any, func: Callable, to_list: bool = True, *args, **kwargs) → Any[source]

Pandas compatible vectorize function. In case a DataFrame is passed the function is applied to all columns.

Parameters:
  • x – Any vector like object
  • func – Any function that should be vectorized
  • to_list – Whether to cast the output to a list
  • args – passed to func
  • kwargs – passed to func
Returns:

Vector like object