AttributeError: SQLContext instance has no attribute 'createDataFrame'
<p>i am new in apache spark an try to work on the big query, when ever i try to run the code i have shared below it gives me error </p>

<blockquote>
  <p>File "/****/***/spark-1.1.0/examples/src/main/python/testSql.py", line 25, in 
      schemaEvents = sqlContext.createDataFrame(events)
  AttributeError: SQLContext instance has no attribute 'createDataFrame'</p>
</blockquote>

<p>I am following follwing links for the practice.
<a href="https://spark.apache.org/docs/latest/sql-programming-guide.html#dataframes" rel="nofollow">https://spark.apache.org/docs/latest/sql-programming-guide.html#dataframes</a></p>

<p>code is shared below.</p>

<pre><code>from pyspark.sql import *


from pyspark import *
#File = "/home/shafee/spark-1.1.0/results-20160315-075804.csv"  # Should be some file on your system
File = ""  # Should be some file on your system
sc = SparkContext()
sqlContext = SQLContext(sc)
Line = sc.textFile("results-20160315-075804.csv")
parts = Line.map(lambda l: l.split(","))
events = parts.map(lambda p: Row(Actor1Name=p[6], SourceUrl=int(p[56])))

schemaEvents = sqlContext.createDataFrame(events)

schemaPeople.registerTempTable("events")
df = sqlContext.sql("SELECT * FROM ").collect()
worldcount = df.count()
print("Totel words counts in csv file: %i" % (worldcount))
</code></pre>