ptype.Schema module

class ptype.Schema.Schema(df, cols)

Bases: object

property cols

A string-indexed dictionary of Column objects, each containing type information inferred by ptype.

show()

Show the schema, as a dataframe.

show_ratios()

Show ratio of normal, missing as anomalous values, as a dataframe.

transform(df)

Transform a dataframe according to the schema. The dataframe must be the one used to infer the schema, or one structurally similar to it.”

param df

dataframe to transform.

return

Transformed dataframe with appropriately typed columns.