ID#
- class sdgx.data_models.inspectors.i_id.IDInspector(*args, **kwargs)[source]#
Bases:
Inspector- _inspect_level: int = 20#
The inspect_level of IDInspector is higher than NumericInspector.
Often, some column, especially int type id column can also be recognized as numeric types by NumericInspector, causing the column to be marked repeatedly.
- fit(raw_data: DataFrame, *args, **kwargs)[source]#
Fit the inspector.
Gets the list of discrete columns from the raw data.
- Parameters:
raw_data (pd.DataFrame) – Raw data
- property inspect_level#
the email column may be recognized as email, but it may also be recognized as the id column, and it may also be recognized by different inspectors at the same time identified as a discrete column, which will cause confusion in subsequent processing), the inspect_leve is used when determining the specific type of a column.
We will preset different inspector levels for different inspectors, usually more specific inspectors will get higher levels, and general inspectors (like discrete) will have inspect_level.
The value of the variable inspect_level is limited to 1-100. In baseclass and bool, discrete and numeric types, the inspect_level is set to 10. For datetime and id types, the inspect_level is set to 20.
Current inspect_level value will make it easier for developers to insert a custom inspector from the middle.
- Type:
Inspected level is a concept newly introduced in version 0.1.6. Since a single column in the table may be marked by different inspectors at the same time (for example
- pii = False#
PII refers if a column contains private or sensitive information.
- ready: bool = False#
Indicates whether the inspector has completed its inference.
When completed, ready == True.