I have a DataFrame named df and I want to find out that can I create partitions while we read data into a DataFrame
AND
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
df.rdd.getNumPartitions()
but by default it is returning 1 only.
I tried coalese()
and repartition
to change the number of partitons.
Please help