class_docstr: Encodes a scalar into a spark dataframe field.
docstr: Constructs a codec.
  
  :param spark_type: an instance of a Type object from :mod:`pyspark.sql.types`
docstr_tok: ["Constructs","a","codec",".",":","param","spark_type",":","an","instance","of","a","Type","object","from",":","mod",":","`","pyspark.sql.types","`"]
code: def __init__(self, spark_type):
      """Constructs a codec.
  
      :param spark_type: an instance of a Type object from :mod:`pyspark.sql.types`
      """
      self._spark_type = spark_type
  
imports: from abc import abstractmethod
  from io import BytesIO
  import numpy
label_desc: Use image node_id 1 to create a new ScalarCodec object from inherited base classes: DataframeColumnCodec with example: obj = ScalarCodec(spark_type)