Re: issue on define a dataframe

2021-12-14 Thread Sean Owen
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: > > >>>

issue on define a dataframe

2021-12-14 Thread bitfox
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