title: Text translation with Pandas
body: <p>I am trying to translate a text column using python which contain different text of different languages  . nothing fancy with my code yet .</p>
  
  <pre><code>import pandas as pd
  df = pd.read_excel('D:/path', head=None)
  </code></pre>
  
  <p>I used the following code :</p>
  
  <pre><code>from googletrans import Translator
  translator = Translator()
  df['Text to English'] = df['Text'].apply(translator.translate, src='id', dest='en')
  </code></pre>
  
  <p>but it gave me an error : </p>
  
  <blockquote>
    <p>AttributeError: 'NoneType' object has no attribute 'group'</p>
  </blockquote>
  
  <p>I search more for any other code and I came up with :</p>
  
  <pre><code>from textblob import TextBlob
  df['Text to English'] = df['Text'].str.encode('ascii', 'ignore').apply(lambda x: TextBlob(x.strip()).translate(to='en'))
  </code></pre>
  
  <p>but it gave me an error of : <code>TypeError: cannot use a string pattern on a bytes-like object</code></p>
  
  <p>is there any solution for this ?? and thanks in advance</p>