title: Pandas astype throwing invalid literal for int() with base 10 error
body: <p>I have a pandas dataframe <code>df</code> whose column name and dtypes are specified in another file (read as <code>data_dict</code>). So to get the data properly I am using the below code:</p>
  <pre><code>col_list = data_dict['name'].tolist()
  dtype_list = data_dict['type'].tolist()
  dtype_dict = {col_list[i]: dtype_list[i] for i in range(len(col_list))}
  df.columns = col_list
  df = df.fillna(0)
  df = df.astype(dtype_dict)
  </code></pre>
  <p>But it is throwing this error:</p>
  <blockquote>
  <p>invalid literal for int() with base 10: '2.230'</p>
  </blockquote>
  <p>Most of the answers I searched online recommended using <code>pd.to_numeric()</code> or something like <code>df[col1].astype(float).astype(int)</code>. The issue here is that <code>df</code> contains 50+ columns out of which around 30 should be converted to integer type. Therefore I don't want to convert the data types one column at a time.</p>
  <p>So how can I easily fix this error?</p>