Skip to content

cape_privacy.pandas.transformations.row_redact#

RowRedact Objects#

class RowRedact()

Redacts rows based on the condition.

Attributes:

  • condition - The condition to be passed into the query function.

__call__#

 | __call__(df: pd.DataFrame) -> pd.DataFrame

Redacts rows using Dataframe.query.

DataFrame.query returns all the fields that it matches so we negate it here to get the opposite.