MCPcopy
hub / github.com/pathwaycom/pathway / typehints

Method typehints

python/pathway/internals/table.py:3119–3136  ·  view source on GitHub ↗

Return the types of the columns as a dictionary. Example: >>> import pathway as pw >>> t1 = pw.debug.table_from_markdown(''' ... age | owner | pet ... 10 | Alice | dog ... 9 | Bob | dog ... 8 | Alice | cat ... 7 | Bo

(self)

Source from the content-addressed store, hash-verified

3117 return self, {}
3118
3119 def typehints(self) -> Mapping[str, Any]:
3120 """
3121 Return the types of the columns as a dictionary.
3122
3123 Example:
3124
3125 >>> import pathway as pw
3126 >>> t1 = pw.debug.table_from_markdown('''
3127 ... age | owner | pet
3128 ... 10 | Alice | dog
3129 ... 9 | Bob | dog
3130 ... 8 | Alice | cat
3131 ... 7 | Bob | dog
3132 ... ''')
3133 >>> t1.typehints()
3134 mappingproxy({'age': <class 'int'>, 'owner': <class 'str'>, 'pet': <class 'str'>})
3135 """
3136 return self.schema.typehints()
3137
3138 def eval_type(self, expression: expr.ColumnExpression) -> dt.DType:
3139 return (

Callers 15

ixMethod · 0.95
__repr__Method · 0.95
__init_subclass__Method · 0.45
sqlFunction · 0.45
table_to_pandasFunction · 0.45
_pandas_transformerFunction · 0.45
successfulMethod · 0.45
unpack_colFunction · 0.45
_mergeMethod · 0.45
knn_lsh_classifyFunction · 0.45
assert_schemas_the_sameFunction · 0.45

Calls

no outgoing calls

Tested by 1