DataType Class

Configures column data types for a dataset created in Azure Machine Learning.

DataType methods are used in the TabularDatasetFactory class from_* methods, which are used to create new TabularDataset objects.

Inheritance
builtins.object
DataType

Constructor

DataType()

Methods

to_bool

Configure conversion to bool.

to_datetime

Configure conversion to datetime.

to_float

Configure conversion to 64-bit float.

to_long

Configure conversion to 64-bit integer.

to_stream

Configure conversion to stream.

to_string

Configure conversion to string.

to_bool

Configure conversion to bool.

static to_bool()

to_datetime

Configure conversion to datetime.

static to_datetime(formats=None)

Parameters

formats
str or list[str]
default value: None

Formats to try for datetime conversion. For example %d-%m-%Y for data in "day-month-year", and %Y-%m-%dT%H:%M:%S.%f for "combined date an time representation" according to ISO 8601.

  • %Y: Year with 4 digits

  • %y: Year with 2 digits

  • %m: Month in digits

  • %b: Month represented by its abbreviated name in 3 letters, like Aug

  • %B: Month represented by its full name, like August

  • %d: Day in digits

  • %H: Hour as represented in 24-hour clock time

  • %I: Hour as represented in 12-hour clock time

  • %M: Minute in 2 digits

  • %S: Second in 2 digits

  • %f: Microsecond

  • %p: AM/PM designator

  • %z: Timezone, for example: -0700

Format specifiers will be inferred if not specified. Inference requires that the data source is accessible from current compute.

to_float

Configure conversion to 64-bit float.

static to_float(decimal_mark='.')

Parameters

decimal_mark
default value: .

Dot "." or comma "," for different regions' standard symbol for the decimal place. Uses a dot decimal marker by default. For example, the number 1234.56 should use "." as the decimal mark and the number 1234,56 should use "," as the decimal mark.

to_long

Configure conversion to 64-bit integer.

static to_long()

to_stream

Configure conversion to stream.

static to_stream(workspace, escaped=False)

Parameters

workspace
Required
escaped
default value: False

to_string

Configure conversion to string.

static to_string()