Python code not working in watson-studio?

151 views Asked by At

I wrote a line of code in watson studio As Rdd = sc.parallelized (range(100)) Output SC is not defined How to solve this please help some buddy

2

There are 2 answers

1
AwesomeCronk On

SC is not defined looks like the result of a Python Traceback (error message). It means that sc references something that has not been created yet.

I suggest checking your spelling to see if maybe you declared sc under a different name. Also, Python is case-sensitive, so beware of that.

0
charles gomes On

Watson Studio has multiple types of environments. There is likelihood that instead of using PySpark based runtime environment , you must have selected Python based runtime environment. Please make sure to check your runtime environment. enter image description here

For more details on runtimes:- https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/spark-envs.html