title: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128) with python
body: <p>I have a ploblem when i test data mining from twitter by i search data by word.</p>
  <p>It error <code>UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)</code> from this code</p>
  <pre><code>retweet = &quot;-filter:retweets&quot;
  query = &quot;#Thailand&quot; + retweet 
  
  df = pd.DataFrame(columns = [&quot;create_at&quot;,&quot;user&quot;,&quot;location&quot;,&quot;text&quot;, &quot;retweet_count&quot;, &quot;favourite_count&quot;,&quot;hashtag&quot;,&quot;follower&quot;,&quot;source&quot;])
  for tweet in tweepy.Cursor(api.search, q = query,result_type=&quot;recent&quot;, tweet_mode='extended').items(100):
       
      entity_hashtag = tweet.entities.get('hashtags')
      hashtag = &quot;&quot;
      for i in range(0, len(entity_hashtag)):
          hashtag = hashtag + &quot;/&quot; + entity_hashtag[i][&quot;text&quot;]
      re_count = tweet.retweet_count
      create_at = tweet.created_at
      user = tweet.user.screen_name
      source = tweet.source
      location = tweet.user.location
      follower = tweet.user.followers_count
  
      try:
          text = tweet.retweeted_status.full_text
          fav_count = tweet.retweeted_status.favorite_count 
  
      except:     
          text = tweet.full_text
          fav_count = tweet.favorite_count  
      new_column = pd.Series([create_at,user,location,text, re_count, fav_count,hashtag,follower,source], index = df.columns)
      df = df.append(new_column, ignore_index = True)
  
  df.to_csv(date_time+&quot;.csv&quot;)
  </code></pre>
  <p>Why have this ploblem ?</p>