title: Pyspark tuple object has no attribute split
body: <p>I am struggling with a Pyspark assignment. I am required to get a sum of all the viewing numbers per channels. I have 2 sets of files: 1 showing the show and views per show the other showing the shows and what channel they are shown on (can be multiple). </p>
  
  <p>I have performed a join operation on the 2 files and the result looks like ..</p>
  
  <pre><code>[(u'Surreal_News', (u'BAT', u'11')),
   (u'Hourly_Sports', (u'CNO', u'79')),
   (u'Hourly_Sports', (u'CNO', u'3')),
  </code></pre>
  
  <p>I now need to extract the channel as the key and then I think do a reduceByKey to get the sum of views for the channels.</p>
  
  <p>I have written this function to extract the chan as key with the views alongside, which I could then use a reduceByKey function to sum the results. However when I try to display results of below function with collect() I get an "AttributeError: 'tuple' object has no attribute 'split'" error</p>
  
  <pre><code>def extract_chan_views(show_chan_views):
      key_value = show_chan_views.split(",")
      chan_views = key_value[1].split(",")
      chan = chan_views[0]
      views = int(chan_views[1])
      return (chan,views) 
  </code></pre>