pycanon.report package#
Submodules#
pycanon.report.base module#
Get report values for all privacy models.
- pycanon.report.base.get_report_values(data: DataFrame, quasi_ident: list, sens_att: list, gen=True) Tuple[int, Tuple[float, int], int, float, Tuple[Any, int], float, float, float, float] #
Generate a report with the parameters obtained for each anonymity check.
- Parameters:
data (pandas dataframe) – dataframe with the data under study.
quasi_ident (list of strings) – list with the name of the columns of the dataframe that are quasi-identifiers.
sens_att (is a list of strings) – list with the name of the columns of the dataframe that are the sensitive attributes.
gen (boolean) – default to true. If true it is generalized for the case of multiple SA, if False, the set of QI is updated for each SA.
pycanon.report.json module#
Get report values as JSON for all privacy models.
- pycanon.report.json.get_json_report(data: DataFrame, quasi_ident: list, sens_att: list, gen=True) str #
Generate a report (JSON) with the parameters obtained for each anonymity check.
- Parameters:
data (pandas dataframe) – dataframe with the data under study.
quasi_ident (list of strings) – list with the name of the columns of the dataframe that are quasi-identifiers.
sens_att (is a list of strings) – list with the name of the columns of the dataframe that are the sensitive attributes.
gen (boolean) – default to true. If true it is generalized for the case of multiple SA, if False, the set of QI is updated for each SA.
pycanon.report.pdf module#
pycanon.report.pdf_utility_report module#
Module contents#
Generate reports with all privacy model’s scores.
- pycanon.report.get_json_report(data: DataFrame, quasi_ident: list, sens_att: list, gen=True) str #
Generate a report (JSON) with the parameters obtained for each anonymity check.
- Parameters:
data (pandas dataframe) – dataframe with the data under study.
quasi_ident (list of strings) – list with the name of the columns of the dataframe that are quasi-identifiers.
sens_att (is a list of strings) – list with the name of the columns of the dataframe that are the sensitive attributes.
gen (boolean) – default to true. If true it is generalized for the case of multiple SA, if False, the set of QI is updated for each SA.
- pycanon.report.get_report_values(data: DataFrame, quasi_ident: list, sens_att: list, gen=True) Tuple[int, Tuple[float, int], int, float, Tuple[Any, int], float, float, float, float] #
Generate a report with the parameters obtained for each anonymity check.
- Parameters:
data (pandas dataframe) – dataframe with the data under study.
quasi_ident (list of strings) – list with the name of the columns of the dataframe that are quasi-identifiers.
sens_att (is a list of strings) – list with the name of the columns of the dataframe that are the sensitive attributes.
gen (boolean) – default to true. If true it is generalized for the case of multiple SA, if False, the set of QI is updated for each SA.
- pycanon.report.print_report(data: DataFrame, quasi_ident: list, sens_att: list, gen=True) None #
Generate a report with the parameters obtained for each anonymity check.
- Parameters:
data (pandas dataframe) – dataframe with the data under study.
quasi_ident (list of strings) – list with the name of the columns of the dataframe that are quasi-identifiers.
sens_att (is a list of strings) – list with the name of the columns of the dataframe that are the sensitive attributes.
gen (boolean) – default to true. If true it is generalized for the case of multiple SA, if False, the set of QI is updated for each SA.