我还处于学习pyspark的初始阶段,我发现下面的代码令人困惑。有没有人能给我解释一下 zipsSchema = smartphoneDF.schema [**field** for field in zipsSchema]
What does "field" before "for" mean, and why is the entire statement enclosed in "[]" When I try to write
print("The name is not on the list") print("The name is on the list")
可以循环一个空列表吗我正在尝试循环列表,如果列表为空并且名称不匹配,它将打印"the name is not the list“,如果是,它将打印"the name is on the list”。