pyspark.RDD.setName

RDD.setName(name: str) → pyspark.rdd.RDD[T][source]

Assign a name to this RDD.

New in version 1.0.0.

Parameters
namestr

new name

Returns
RDD

the same RDD with name updated

See also

RDD.name()

Examples

>>> rdd = sc.parallelize([1, 2])
>>> rdd.setName('I am an RDD').name()
'I am an RDD'