title: Spark AttributeError: 'SparkContext' object has no attribute 'map'
body: <p>I am using Spark on Hortonworks Data Platform 2.2, I get the following error...any ideas?</p>
  
  <pre><code>#!/usr/bin/env python
  
  import sys
  import pyspark
  from pyspark import SparkContext
  
  if 'sc' not in globals():
      #sc = SparkContext('local[4]', 'pyspark','map')
      sc = SparkContext(appName="PythonKMeans")
  
  nums = sc.map([23,232,1,232,43,43])
  squared = nums.map(lambda x: x*x).collect()
  for num in squared:
      print num
  </code></pre>