lambda_func
lambda_func ¤
LambdaProcessor ¤
LambdaProcessor(
dataframe: DataFrame, column_name: str = "systime"
)
Bases: Base
Provides class methods for applying lambda or callable functions to columns in a pandas DataFrame. This class inherits from Base, ensuring consistency with other processors.
apply_function
classmethod
¤
apply_function(
dataframe: DataFrame,
column_name: str,
func: Callable[[Any], Any],
) -> pd.DataFrame
Applies a lambda or callable function to a specified column in the DataFrame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataframe
|
DataFrame
|
The DataFrame containing the data. |
required |
column_name
|
str
|
The name of the column to apply the function to. |
required |
func
|
Callable
|
The lambda function or callable to apply to the column. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.DataFrame: The DataFrame with the transformed column. |