kumoai.graph.Column#
- class kumoai.graph.Column[source]#
Bases:
CastMixinA column represents metadata information for a column in a Kumo
Table. Columns can be created independent of a table, or can be fetched from a table with thecolumn()method.import kumoai # Fetch a column from a `kumoai.Table`: table = kumoai.Table(...) column = table.column("col_name") column = table["col_name"] # equivalent to the above. # Edit a column's data type: print("Existing dtype: ", column.dtype) column.dtype = "int" # Edit a column's semantic type: print("Existing stype: ", column.stype) column.stype = "ID"
- Parameters:
name (
str) – The name of this column.stype (
Union[Stype,str,None]) – The semantic type of this column. Semantic types can be specified as strings: the list of possible semantic types is located atStype.dtype (
Union[Dtype,str,None]) – The data type of this column. Data types can be specified as strings: the list of possible data types is located atDtype.timestamp_format (
Union[str,TimestampUnit,None]) – If this column represents a timestamp, the format that the timestamp should be parsed in. The format can either be aTimestampUnitfor integer columns or a string with a format identifier described here for a SaaS Kumo deployment and here for a Snowpark Container Services Kumo deployment. If left empty, will be intelligently inferred by Kumo.