line = "Hello, world"
sc.parallelize(list(line)).collect()
I obtain the following error
TypeError: parallelize() missing 1 required positional argument: 'c'
I also have an other issue when creating a dataframe from a list of strings with only one column:
from pyspark.sql.types import *
from pyspark.sql import SQLContext
sqlContext = SQLContext(sc)
schema = StructType([StructField("name", StringType(), True)])
df3 = sqlContext.createDataFrame(fuzzymatchIntro, schema)
df3.printSchema()
I obtain the following error:
----> 3 sqlContext = SQLContext(sc)
AttributeError: type object 'SparkContext' has no attribute '_jsc'
Thank you in advance
sc?