Request physical partitions
repartition(2) redistributes this DataFrame into two physical partitions. getNumPartitions inspects the underlying RDD in this classic Spark runtime. Partition count is not row count, worker count, or a promise that all tasks run simultaneously. The tiny result DataFrame only displays that measured count; its own partition layout is unrelated.