title: Prevent DataFrame.partitionBy() from removing partitioned columns from schema
body: <p>I am partitioning a DataFrame as follows:</p>
  
  <pre><code>df.write.partitionBy("type", "category").parquet(config.outpath)
  </code></pre>
  
  <p>The code gives the expected results (i.e. data partitioned by type &amp; category). However, the "type" and "category" columns are removed from the data / schema. Is there a way to prevent this behaviour?</p>