title: How to apply Polyglot Detector function to dataframe
body: <p>Assuming I have a column called <code>df.Text</code> which contains text (more that 1 sentence) and I want to use polyglot <code>Detector</code> to detect the language and store the value in a new column <code>df['Text-Lang']</code> how do I ensure I also capture the other details like <code>code</code> and <code>confidence</code> </p>
  
  <pre><code>testEng ="This is English"
  lang = Detector(testEng)
  print(lang.language)
  </code></pre>
  
  <p>returns</p>
  
  <blockquote>
    <p>name: English     code: en       confidence:  94.0 read bytes:  1920</p>
  </blockquote>
  
  <p>but </p>
  
  <pre><code>df['Text-Lang','Text-LangConfidence']= df.Text.apply(Detector)
  </code></pre>
  
  <p>ends with </p>
  
  <blockquote>
    <p>AttributeError: 'float' object has no attribute 'encode' and Detector
    is not able to detect the language reliably.</p>
  </blockquote>
  
  <p>Am I applying the Detector function incorrectly or storing the output incorrectly or something else?</p>