Skip to content

Functions

flowtask.components.FilterRows.functions

Functions for FilterRows.

filter_rows_by_column

filter_rows_by_column(df, column_source, pattern, column_destination)

Filter rows in a DataFrame by removing rows where column_destination values are found in column_source values.

Parameters:

Name Type Description Default
df DataFrame

The DataFrame to filter.

required
column_source str

The name of the column to extract values from.

required
pattern str

The regex pattern to match (for string columns) or None for integer columns.

required
column_destination str

The name of the column to check against.

required

Returns:

Type Description
DataFrame

pd.DataFrame: A DataFrame with rows removed where column_destination values are in column_source values.