title: ValueError: could not convert string to float: '86,5484466552734'
body: <p>When changing to a float using</p>
  <pre><code>final.iloc[:,4:10]=final.iloc[:,4:10].replace(',', '.').astype(float)
  </code></pre>
  <p>I am getting the following error:</p>
  <pre><code>[ValueError                                Traceback (most recent call last)
  &lt;ipython-input-33-56c93743e023&gt; in &lt;module&gt;
        1 final.dtypes
  ----&gt; 2 final.iloc\[:,4:10\]=final.iloc\[:,4:10\].replace(',', '.').astype(float)
  
  ~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\generic.py in astype(self, dtype, copy, errors)
     5875         else:
     5876             # else, only a single dtype is given
  -&gt; 5877             new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
     5878             return self._constructor(new_data).__finalize__(self, method=&quot;astype&quot;)
     5879 
  
  ~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\internals\managers.py in astype(self, dtype, copy, errors)
      629         self, dtype, copy: bool = False, errors: str = &quot;raise&quot;
      630     ) -&gt; &quot;BlockManager&quot;:
  --&gt; 631         return self.apply(&quot;astype&quot;, dtype=dtype, copy=copy, errors=errors)
      632 
      633     def convert(
  
  ~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\internals\managers.py in apply(self, f, align_keys, ignore_failures, **kwargs)
      425                     applied = b.apply(f, **kwargs)
      426                 else:
  --&gt; 427                     applied = getattr(b, f)(**kwargs)
      428             except (TypeError, NotImplementedError):
      429                 if not ignore_failures:
  
  ~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\internals\blocks.py in astype(self, dtype, copy, errors)
      671             vals1d = values.ravel()
      672             try:
  --&gt; 673                 values = astype_nansafe(vals1d, dtype, copy=True)
      674             except (ValueError, TypeError):
      675                 # e.g. astype_nansafe can fail on object-dtype of strings
  
  ~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\core\dtypes\cast.py in astype_nansafe(arr, dtype, copy, skipna)
     1095     if copy or is_object_dtype(arr) or is_object_dtype(dtype):
     1096         # Explicit copy, or required since NumPy can't view from / to object.
  -&gt; 1097         return arr.astype(dtype, copy=True)
     1098 
     1099     return arr.view(dtype)
  
  ValueError: could not convert string to float: '86,5484466552734'][1]
  </code></pre>
  <p>From it, one can see</p>
  <blockquote>
  <p>ValueError: could not convert string to float: '86,5484466552734'</p>
  </blockquote>
  <p>For the reference, these are the data types of the df columns I am working with (using <code>df.dtypes</code>)</p>
  <pre><code>Country.Name                                                                              object
  Country.Code                                                                              object
  Year                                                                                       int64
  Prevalence of stunting, height for age (% of children under 5)                            object
  Trained teachers in lower secondary education, male (% of male teachers)                  object
  Share of youth not in education, employment or training, total (% of youth population)    object
  External debt stocks (% of GNI)                                                           object
  Contributing family workers, male (% of male employment) (modeled ILO estimate)           object
  Tax revenue (% of GDP)                                                                    object
  Over-age students, primary, female (% of female enrollment)                               object
  nans                                                                                       int64
  dtype: object
  </code></pre>