title: How do i split the text part of a tweet to have each word of the text in a new column in a CSV file
body: <p>Outputting tweets to a CSV file and want to separate the text portion to have each word in a new column so i can run it through a classifier using python</p>
  
  <pre><code>for tweet in alltweets:
  
      #Loop to only return the tweets that have been posted in the last 24 hours     
      if (datetime.datetime.now() - tweet.created_at).days &lt; 1:
          # transform the tweepy tweets into a 2D array that will populate the csv    
          outtweets.append([tweet.user.name, tweet.created_at, tweet.text.encode("utf-8")])
  
      else:
          deadend = True
          return
      if not deadend:
          page += 1
  
  # write the csv    
  with open('%s_tweets.csv' % screen_name, 'w') as f:
      writer = csv.writer(f)
      writer.writerow(["name", "created_at", "text"])
      writer.writerows(outtweets)
  pass
  </code></pre>
  
  <p>** EDIT **
  <a href="https://i.stack.imgur.com/lGroI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lGroI.jpg" alt="Tweets in CSV"></a></p>
  
  <p>** EDIT 2 **</p>
  
  <pre><code>outtweets.append(list(itertools.chain([tweet.user.name, tweet.created_at],tweet.text.encode("utf-8").split(' '))))
  TypeError: a bytes-like object is required, not 'str'
  </code></pre>