pasteur.encode.PostprocessEncoder#

class pasteur.encode.PostprocessEncoder(*args, _from_factory=False, **kwargs)[source]#

Same as AttributeEncoder but allows customizing the tables after they have been encoded or adding additional ones.

Unlike AttributeEncoder, this one does not parallelize per-table, so it should be avoided unless customization is required.

Attributes

Methods

decode(enc)

encode(data)

finalize(meta, ids, tables, ctx)

fit(attr, data)

get_factory(*args, **kwargs)

Returns a factory that registers this module to the system.

get_metadata()

get_post_metadata(relationships, attrs, ...)

reduce(other)

undo(meta, data)

Undoes the process of finalize(), returns a tuple of (ids, tables).

decode(enc)#
Return type:

DataFrame

encode(data)#
Return type:

DataFrame

finalize(meta, ids, tables, ctx)[source]#
Return type:

Mapping[str, Any]

fit(attr, data)#
classmethod get_factory(*args, **kwargs)#

Returns a factory that registers this module to the system.

Any *args and **kwargs passed to this function will be saved and passed to the module’s __init__() method when calling build().

get_metadata()#
Return type:

dict[str | tuple[str, ...], TypeVar(META)]

get_post_metadata(relationships, attrs, ctx_attrs)[source]#
Return type:

TypeVar(POST_META)

name: str = ''#
reduce(other)#
undo(meta, data)[source]#

Undoes the process of finalize(), returns a tuple of (ids, tables).

Return type:

tuple[Mapping[str, DataFrame], Mapping[str, DataFrame], Mapping[str, Mapping[str, DataFrame]]]