DataConversion¶
-
class
DataConversion.
DataConversion
(cols=None, convertTo='', dateTimeFormat='yyyy-MM-dd HH:mm:ss')[source]¶ Bases:
mmlspark.Utils.ComplexParamsMixin
,pyspark.ml.util.JavaMLReadable
,pyspark.ml.util.JavaMLWritable
,pyspark.ml.wrapper.JavaTransformer
Converts the specified list of columns to the specified type. The types are specified by the following strings:
- “boolean”
- “byte”
- “short”
- “integer”
- “long”
- “float”
- “double”
- “string”
- “toCategorical” - make the column be a categorical column
- “clearCategorical” - clear the categorical column
- “date” - the default date format is: “yyyy-MM-dd HH:mm:ss”
Parameters: -
getCols
()[source]¶ Returns: Comma separated list of columns whose type will be converted Return type: list
-
getDateTimeFormat
()[source]¶ Returns: Format for DateTime when making DateTime:String conversions (default: yyyy-MM-dd HH:mm:ss) Return type: str
-
setCols
(value)[source]¶ Parameters: cols (list) – Comma separated list of columns whose type will be converted
-
setDateTimeFormat
(value)[source]¶ Parameters: dateTimeFormat (str) – Format for DateTime when making DateTime:String conversions (default: yyyy-MM-dd HH:mm:ss)