title: 'str' object has no attribute 'flatMap'
body: <p>I am quite new to Python. I have Anaconda3 – 4.4.0 installed with a PySpark kernel (Spark 2.2.0).</p>
  
  <p>I am trying to test a simple script using a simple text file on my Windows 7 OS to make sure some of the capabilities of my Python installation works. </p>
  
  <p>Here is my script:</p>
  
  <pre><code> word_counts = ('C:\\Users\\oakins1p\\WeeklyMeeting.txt') \
  .flatMap(lambda line: line.split()) \
  .map(lambda word: (word, 1)) \
  .reduceByKey(lambda a, b: a + b)\
  .saveAsTextFile('C:\\Users\\oakins1p\\WeeklyMeetingOutput.txt')\`
  </code></pre>
  
  <p>I keep getting a <code>AttributeError: 'str' object has no attribute 'flatMap'</code> and I am not sure how to resolve this. </p>