This is just basic Python - you're missing parentheses on toDF, so you are
not calling a function nor getting its result.

On Sun, Feb 6, 2022 at 9:39 PM <capitnfrak...@free.fr> wrote:

> I am a bit confused why in pyspark this doesn't work?
>
> >>> x = sc.parallelize([3,2,1,4])
> >>> x.toDF.show()
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> AttributeError: 'function' object has no attribute 'show'
>
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: user-unsubscr...@spark.apache.org
>
>

Reply via email to