title: Change schema of existing dataframe
body: <p>I want to change schema of existing dataframe,while changing the schema I'm experiencing error.Is it possible I can change the existing schema of a dataframe.</p>
  
  <pre><code>val customSchema=StructType(
        Array(
          StructField("data_typ", StringType, nullable=false),
          StructField("data_typ", IntegerType, nullable=false),
          StructField("proc_date", IntegerType, nullable=false),
          StructField("cyc_dt", DateType, nullable=false),
          ));
  
  val readDF=
  +------------+--------------------+-----------+--------------------+
  |DatatypeCode|         Description|monthColNam|     timeStampColNam|
  +------------+--------------------+-----------+--------------------+
  |       03099|Volumetric/Expand...|     201867|2018-05-31 18:25:...|
  |       03307|  Elapsed Day Factor|     201867|2018-05-31 18:25:...|
  +------------+--------------------+-----------+--------------------+
  
  val rows= readDF.rdd
  val readDF1 = sparkSession.createDataFrame(rows,customSchema)
  </code></pre>
  
  <p>expected result</p>
  
  <pre><code>val newdf=
      +------------+--------------------+-----------+--------------------+
      |data_typ_cd |       data_typ_desc|proc_dt    |     cyc_dt         |
      +------------+--------------------+-----------+--------------------+
      |       03099|Volumetric/Expand...|     201867|2018-05-31 18:25:...|
      |       03307|  Elapsed Day Factor|     201867|2018-05-31 18:25:...|
      +------------+--------------------+-----------+--------------------+
  </code></pre>
  
  <p>Any help will be appricated </p>