MCPcopy Index your code
hub / github.com/pathwaycom/pathway / schema_from_columns

Function schema_from_columns

python/pathway/internals/schema.py:39–52  ·  view source on GitHub ↗
(
    columns: Mapping[str, clmn.Column],
    id_column: clmn.IdColumn,
)

Source from the content-addressed store, hash-verified

37
38
39def schema_from_columns(
40 columns: Mapping[str, clmn.Column],
41 id_column: clmn.IdColumn,
42) -> type[Schema]:
43 _name = "schema_from_columns(" + str(list(columns.keys())) + ")"
44
45 return schema_builder(
46 columns={
47 name: ColumnDefinition.from_properties(c.properties)
48 for name, c in columns.items()
49 },
50 name=_name,
51 id_dtype=id_column.dtype,
52 )
53
54
55def _type_converter(series: pd.Series) -> dt.DType:

Callers 2

__init__Method · 0.90
assert_schemas_the_sameFunction · 0.90

Calls 4

from_propertiesMethod · 0.80
itemsMethod · 0.80
schema_builderFunction · 0.70
keysMethod · 0.45

Tested by

no test coverage detected