title: How to find number of partitions in a DataFrame using Python in spark And how to create Partitions in a DataFrame with Python in spark
body: <p>I have a DataFrame named df and I want to find out that can I create partitions while we read data into a DataFrame</p>
  <p>AND</p>
  <p>I also want to understand how can we find the number of partitions in a DataFrame.
  I have searched multiple answers which show the following
  <code>df.rdd.getNumPartitions()</code> but by default it is returning 1 only.</p>
  <p>I tried <code>coalese()</code> and <code>repartition</code> to change the number of partitons.</p>
  <p>Please help</p>