acidplyr.filter_nested

acidplyr.filter_nested(df: DataFrame, pattern: str, ignore_case: bool = False) DataFrame

Filter rows of a DataFrame by regex pattern across all columns.

Searches through all columns including list-columns (nested). A row is kept if any value (recursively unlisted) matches the pattern.

Parameters:
  • df (pd.DataFrame) – Input DataFrame to filter.

  • pattern (str) – Regular expression pattern to match.

  • ignore_case (bool) – Whether to perform case-insensitive matching.

Returns:

Filtered DataFrame containing only matching rows.

Return type:

pd.DataFrame