SparkSQL中有多种数据转换的方法,包括以下几种: 1. 选择列 使用select()方法可以选择DataFrame中的一部分列,例如: df.select("name", "age") 以上代码中,我们选择了DataFrame中的"name"和"age"列。 2. 过滤行 使用filter()方法可以过滤DataFrame中的行,例如: df.filter(df["age"] >