Is this python? Just try passing [("apple",), ("orange",), ...]
On Tue, Dec 14, 2021 at 7:18 PM wrote:
> Hello,
>
> Spark newbie here :)
>
> Why I can't create the dataframe with just one column?
>
> for instance, this works:
>
> >>>
Hello,
Spark newbie here :)
Why I can't create the dataframe with just one column?
for instance, this works:
df=spark.createDataFrame([("apple",2),("orange",3)],["name","count"])
But this can't work:
df=spark.createDataFrame([("apple"),("orange")],["name"])
Traceback (most recent call