ptype.Ptype module
- class ptype.Ptype.Ptype
Bases:
object
The Ptype object. It uses the following data types: date, integer, float and string.
- get_additional_an_values()
Get list of additional values which Ptype should consider to mean ‘anomalous’.
- get_na_values()
Get list of all values which Ptype considers to mean ‘missing’ or ‘na’.
- get_string_alphabet()
Get the alphabet associated with the string type.
- schema_fit(df)
Run inference for each column in a dataframe.
- Parameters
df – dataframe loaded by reading values as strings.
- Returns
Schema object with information about each column.
- set_additional_an_values(an_values)
Set list of additional values which Ptype should consider to mean ‘anomalous’.
- set_na_values(na_values)
Set list of values which Ptype considers to mean ‘missing’ or ‘na’.
- set_string_alphabet(alphabet)
Set the alphabet associated with the string type.