title: ValueError: could not convert string to float: ''20,99''
body: <p>I have a dataframe that looks like this with 13000 rows</p>
  
  <pre><code>print(df)
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>           Date       Price   Nation
  0    01/01/2018    -5.000,73  Spain
  1    01/01/2018        15,60  Italy
  3    01/01/2018        14,13  Italy
  4    01/01/2018        12,53  Spain
  5    01/01/2018        16,64  Italy
  6    01/01/2018        22,48  Italy
  7    01/01/2018        24,30  Italy
  8    01/01/2018        24,88  Spain
  9    01/01/2018        31,40  Italy
  10   01/01/2018        18,74  Italy
  </code></pre>
  
  <p>Price Column is a <code>non-null object</code>
  I removed all the white spaces and dropped al the empty rows
  I tried to work only with the price column converting from a Series to a String</p>
  
  <pre><code>string=df['Price'].to_string()
  print(string)
  </code></pre>
  
  
  
  <pre><code>0        -5.000,73
  1            15,60
  3            14,13
  4            12,53
  5            16,64
  6            22.48
  7            24.30
  8            24.88
  9            31.40
  10           18.74
  </code></pre>
  
  <p>When I tried</p>
  
  <pre><code>string=string.strip('.')
  string=string.replace(',','.')
  float(string.strip().strip("'"))
  </code></pre>
  
  <p>The system returned me an error message:</p>
  
  <pre class="lang-none prettyprint-override"><code>ValueError: could not convert string to float: '0
  -5.000.73\n1            15.60\n3            14.13\n4            12.53\n5            16.64\n6            22.48\n7            24.30\n8            24.88\n9            31.40\n10         
  </code></pre>
  
  <p>The data are loaded from a csv, and the delimiter is <code>,</code></p>
  
  <ol>
  <li>How can I easily convert to a float, considering that \n7, \n10,..., \n160000 are not regularly increased?</li>
  <li>Why I get this kind of problem?</li>
  <li>If I open my csv with Jupyter or on excel I cannot see <code>/n32</code>, but only something like this <br />
  <code>"01/01/2018","16,60","Spain"</code>,  I know that <code>/n</code> is used for giving a vertical space, but I don't know how to deal with it, I noticed that is related with the index </li>
  </ol>
  
  <p>I read this questions, tried other solutions, but none solved my problem:</p>
  
  <p><a href="https://stackoverflow.com/questions/16729210/numpy-loadtxt-valueerror-could-not-convert-string-to-float">numpy.loadtxt, ValueError: could not convert string to float</a></p>
  
  <p><a href="https://stackoverflow.com/questions/42013867/valueerror-could-not-convert-string-to-float-0-274697-n">ValueError: could not convert string to float: &#39;-0,274697\n&#39;</a></p>
  
  <p><a href="https://stackoverflow.com/questions/379906/how-do-i-parse-a-string-to-a-float-or-int-in-python">How do I parse a string to a float or int in Python?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/29219479/python-convert-string-to-float">Python convert string to float</a></p>
  
  <p><a href="https://stackoverflow.com/questions/28158099/python-valueerror-could-not-convert-string-to-float">Python. ValueError could not convert string to float:</a></p>
  
  <p><a href="https://stackoverflow.com/questions/47559522/valueerror-could-not-convert-string-to-float-in-pyspark">ValueError: could not convert string to float in Pyspark</a></p>