Open ashkan-leo opened 5 years ago
To whom it may concern,
I am experiencing the same issue trying to share remote variables (I tried a pandas dataframe, an int and a string) with my local notebook.
An error was encountered: 'str' object has no attribute 'toJSON' Traceback (most recent call last): AttributeError: 'str' object has no attribute 'toJSON'
I am using sparkmagic-0.15.0 with python3 ("spark.pyspark.python": "python3").
Any suggestions ?
Thanks for your help,
Not an ideal solution but whatever you want to pass you can convert it to a Spark Dataframe first. If it is a primitive data type like an integer for example:
%spark -o i
i = spark.createDataFrame([[1]])
then read on your local:
%local
i.iloc[0,0]
I am running the following:
And I get the following exception: