title: Error: Unable to parse string "*" at position 6116 - Convert Object Type to Int - Pandas
body: <p>This question has been asked in many threads and has worked for others, but not for me. I am trying to convert <code>object</code> data type into <code>int</code> to perform a group by aggregation. 
  Following are what I tried and the errors I got so far, (I am using python 3)
  According to this link, I tried <a href="https://stackoverflow.com/questions/39173813/pandas-convert-dtype-object-to-int?noredirect=1&amp;lq=1">these two</a>:</p>
  
  <pre><code>df['my_var'] = df['my_var'].astype(str).astype(int)
  df['my_var'] = df['my_var'].astype(int)
  </code></pre>
  
  <p>Same error for both:</p>
  
  <blockquote>
    <p>ValueError: invalid literal for int() with base 10: '*'</p>
  </blockquote>
  
  <p>And then I <a href="https://stackoverflow.com/questions/43677933/converting-object-to-int-pandas">tried</a>,</p>
  
  <pre><code>df['my_var'] = pd.to_numeric(df['my_var'])
  </code></pre>
  
  <p>I got an error:</p>
  
  <blockquote>
    <p>ValueError: Unable to parse string "*" at position 6116</p>
  </blockquote>
  
  <p>This is how <code>dtypes</code> looks like,</p>
  
  <pre><code>print (df.dtypes)
  my_var object
  dtype: object
  </code></pre>
  
  <p>I know some of the similar questions are down voted, however, I did not succeed using those answers. Is it a version error? I am finding it difficult to understand this error. Any help or suggestion would be appreciated. </p>