title: Python pandas not saving csv file in correct format and increasing size of file(observed that integer values are saved as decimal in csv[250 =250.0])
body: <p>Python pandas is not saving csv file in correct format and increasing size of the file. Observed that integer values are saved as decimal in the csv file e.g. 250 value is saved 250.0 from python code.</p>
  <p><strong>Note:</strong> I am not updating 250 integer value. I am updating other columns. But looks like from python its saving as default to decimal</p>
  <p>I am using python pandas library. I have one task where I have to read the existing csv file and update some columns in that csv with new values and upload that file on UI on the web application</p>
  <p>It is not writing the exact same thing in a CSV file using Python pandas. Original size 36k and after update size is 37k</p>
  <p><strong>Failing</strong>: The file updated by my python code is working fine and also updating values in the CSV file but it's showing file size is 37k.
  When I upload the same 37k file on UI, it is failing.</p>
  <p><strong>Passing:</strong> When I manually open the above-updated file by python code in excel and just save it without changing anything then the size of the file is 36k and that file is working and I am able to upload on UI successfully</p>
  <ul>
  <li>pandas==1.3.1</li>
  <li>Python 3.8.3</li>
  </ul>
  <p>Steps I am doing:</p>
  <ol>
  <li>Read csv using below code with file size 36k</li>
  <li>Update some columns using python code (Here I observed it is saving  integer values as decimal in the csv file e.g. 250.0)</li>
  <li>Check file size which is now 37k after update</li>
  <li>Just open the same file which is 37k I. E updated by code in excel format</li>
  <li>Just save without changing any content (Here I observed it is saving integer as decimal in the csv file e.g. 250)</li>
  <li>Now check file size becomes 36k which uploads successfully</li>
  </ol>
  <p>Below code is updating file as expected:</p>
  <pre class="lang-py prettyprint-override"><code>df = pd.read_csv(file_path)
  # updating the column value/data
  for i in range(0, len(df)):
      df.loc[i,'Your_Name']= random_name
      df.loc[i,'Pay_Number'] = random_number
  df.to_csv(file_path, index=False)
  </code></pre>
  <p>Why it's changing the size of the file when I save it through python code and working when just open the same file in excel and save it without changing anything?</p>
  <p>When I am saving the from python code , file size is 37k and when I just opened same file in excel updated by python code and just click save without updating any content. Then size of same file is 36k . So that is the difference when saving from code , something is added extra</p>
  <p>Note:</p>
  <p>I tried to close the file, rename, replace, move the file after updating then upload on UI but no luck.</p>