code: def cast(self, dataType):
          
          if isinstance(dataType, basestring):
              jc = self._jc.cast(dataType)
          elif isinstance(dataType, DataType):
              from pyspark.sql import SparkSession
              spark = SparkSession.builder.getOrCreate()
              jdt = spark._jsparkSession.parseDataType(dataType.json())
              jc = self._jc.cast(jdt)
          else:
              raise TypeError("unexpected type: %s" % type(dataType))
          return Column(jc)
docs: Convert the column into type ``dataType``.
  
          >>> df.select(df.age.cast("string").alias('ages')).collect()
          [Row(ages=u'2'), Row(ages=u'5')]
          >>> df.select(df.age.cast(StringType()).alias('ages')).collect()
          [Row(ages=u'2'), Row(ages=u'5')]