pysparks flatMap in pandas
Ist in Pandas eine Operation vorhanden, die dasselbe bewirkt wie flatMap im Pyspark?
flatMap Beispiel:
>>> rdd = sc.parallelize([2, 3, 4])
>>> sorted(rdd.flatMap(lambda x: range(1, x)).collect())
[1, 1, 1, 2, 2, 3]
So weit kann ich an @ denkapply
gefolgt vonitertools.chain
, aber ich frage mich, ob es eine Ein-Schritt-Lösung gibt.