title: Python data error: ValueError: invalid literal for int() with base 10: '42152129.0'
body: <p>I am working on a simple data science project with Python. However, I am getting an error which is the following:</p>
  
  <p>ValueError: could not convert string to float:</p>
  
  <p>Here is what my code looks like:</p>
  
  <pre><code>import matplotlib.pyplot as plt 
  import csv
  from datetime import datetime
  
  filename = 'USAID.csv'
  with open(filename) as f:
  reader = csv.reader(f)
  header_row = next(reader)
  
  monies = []
  for row in reader:
     money = int(row[1])
     monies.append(money)
  print(monies)
  </code></pre>
  
  <p>if I change the line:</p>
  
  <pre><code>money = int(row[1]) to money = float(row[1])
  </code></pre>
  
  <p>I get this error: ValueError: could not convert string to float:
  Here are my tracebacks: first error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "funding.py", line 60, in &lt;module&gt;
    money = int(row[1])
  ValueError: invalid literal for int() with base 10: '42152129.0'
  </code></pre>
  
  <p>Second Error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "funding.py", line 60, in &lt;module&gt;
    money = float(row[1])
  ValueError: could not convert string to float:
  </code></pre>
  
  <p>Any help would be great! Thank you!</p>