boilercv_pipeline.models.column
#
Data column model.
Submodules#
Package Contents#
Classes#
Functions#
Data#
Kind of column. |
API#
- class boilercv_pipeline.models.column.Parts#
Bases:
typing.NamedTuple
Label parts.
- boilercv_pipeline.models.column.get_parts(
- string: str,
Get parts of a label.
- class boilercv_pipeline.models.column.Col#
Column.
- __post_init__()#
Post-init.
- property no_sub: boilercv_pipeline.models.column.Col#
Canonical name without subscript.
- property no_unit: boilercv_pipeline.models.column.Col#
Canonical name without unit.
- classmethod from_col( ) boilercv_pipeline.models.column.Col #
Build a column from a column.
- classmethod only_raw(
- name: str,
Build a column without handling subscript and units.
- rename(
- df: pandas.DataFrame,
Rename this column.
- class boilercv_pipeline.models.column.ConstCol#
Bases:
boilercv_pipeline.models.column.Col
Constant column.
- assign(
- df: pandas.DataFrame,
Assign this column.
- boilercv_pipeline.models.column.transform(
- v: boilercv_pipeline.models.column.types.P,
- src: boilercv_pipeline.models.column.Col,
- dst: boilercv_pipeline.models.column.Col,
- f: boilercv_pipeline.models.column.types.Transform[boilercv_pipeline.models.column.types.P, boilercv_pipeline.models.column.types.R, boilercv_pipeline.models.column.types.Ps],
- /,
- *args: boilercv_pipeline.models.column.types.Ps.args,
- **kwds: boilercv_pipeline.models.column.types.Ps.kwargs,
Transform.
- boilercv_pipeline.models.column.scale(
- v: boilercv_pipeline.models.column.types.SupportsMul_T,
- s: boilercv_pipeline.models.column.types.SupportsMul_T,
- src: boilercv_pipeline.models.column.Col,
- dst: boilercv_pipeline.models.column.Col,
Scale.
- class boilercv_pipeline.models.column.Transform#
Column transformer.
- class boilercv_pipeline.models.column.LinkedCol#
Bases:
boilercv_pipeline.models.column.Col
Column linked to a source.
- source: boilercv_pipeline.models.column.Col#
‘field(…)’
- rename(
- df: pandas.DataFrame,
Rename this column.
- convert(
- df: pandas.DataFrame,
- ureg: pint.UnitRegistry,
Convert this column.
- class boilercv_pipeline.models.column.IdentityCol#
Bases:
boilercv_pipeline.models.column.LinkedCol
Column with a source the same as itself.
- __post_init__()#
- boilercv_pipeline.models.column.rename(
- df: pandas.DataFrame,
- columns: list[boilercv_pipeline.models.column.LinkedCol],
Rename.
- boilercv_pipeline.models.column.convert(
- df: pandas.DataFrame,
- cols: list[boilercv_pipeline.models.column.LinkedCol],
- ureg: pint.UnitRegistry,
Convert.
- class boilercv_pipeline.models.column._Kind(
- /,
- **data: typing.Any,
Bases:
pydantic.BaseModel
Kind of column.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.
- boilercv_pipeline.models.column.Kind#
‘_Kind(…)’
Kind of column.