📅  最后修改于: 2022-03-11 14:45:58.398000             🧑  作者: Mango
# Create a DataFrame containing elements in a range
spark.range(1, 7, 2).collect()
# [Row(id=1), Row(id=3), Row(id=5)]
spark.range(3).collect()
#[Row(id=0), Row(id=1), Row(id=2)]