title: How can I remove .0 from 2017.0, 2018.0, 2019.0 etc..?
body: <pre><code>data3['year'] = pd.DatetimeIndex(data3['release date']).year
  
  release date box office   admissions year
  0 2014-07-30 135756879810 17615590 2014.0 
  1 2019-01-23 139648179516 16264984 2019.0 
  2 2017-12-20 115707014137 14411662 2017.0 
  3 2014-12-17 110940529730 14263332 2014.0 
  4 2019-04-24 122182694160 13934592 2019.0 
  
  data3 = data3.astype(str)
  data3 = [line.rstrip(.0) for line in data3]
  </code></pre>
  
  <p>I want to remove all '.0' from 'year' column.
  I searched a lot but replace() is not working and rstrip() has error. 
  To correct error, I changed the type of data3 to (str).. but still got error</p>
  
  <p>How can I remove .0 from year column ?</p>