Dataset

Dataset encapsulates a dataset in to be analyzed or anonymized using ARXaaS

class pyarxaas.models.dataset.Dataset(data: list, attribute_types: collections.abc.Mapping = None)[source]

Understand tabular data containing personal data.

describe()[source]

Prints a description of the Dataset to stdout

Returns:None
classmethod from_dict(dictionary)[source]

Create Dataset from a python dictionary

Parameters:dictionary – Mapping object to create Dataset from
Returns:Dataset
classmethod from_pandas(dataframe: pandas.core.frame.DataFrame)[source]

Create a Dataset from a pandas DataFrame

Parameters:dataframe – pandas Dataframe
Returns:Dataset
set_attribute_type(attribute_type: pyarxaas.models.attribute_type.AttributeType, *attributes)[source]

Set AttributeType for a collection of attributes

Parameters:
  • attributes – collection of attributes in the dataset
  • attribute_type – AttributeType for the attributes
Returns:

None

set_hierarchy(attribute, hierarchy)[source]

Set hierarchy for a attribute in the Dataset

Parameters:
  • attribute – attribute in the Dataset
  • hierarchy – to be applied to the attribute
Returns:

None

to_dataframe() → pandas.core.frame.DataFrame[source]

Create pandas DataFrame of the Dataset

Returns:pandas.DataFrame