【发布时间】:2021-05-25 03:04:33
【问题描述】:
例如,现在我有这个 DataFrame。
+--------+------+
| id|number|
+--------+------+
|19891201| 1|
|19891201| 4|
+--------+------+
但我希望这个 DataFrame 是这样的。
+--------+------+
| id|number|
+--------+------+
|19891201| 1|
|19891201| 2|
|19891201| 3|
|19891201| 4|
+--------+------+
我想创建新行,其数字范围为“数字”列中的 min() 和 max() 值。
在此示例中,我希望在“数字”列中的值为 2 和 3 的行。
【问题讨论】:
-
火花版本?
标签: python scala apache-spark pyspark