pyspark.TaskContext.partitionId

TaskContext.partitionId() → int[source]

The ID of the RDD partition that is computed by this task.