title: How to preserve the datatype while iterating dataframe in pandas?
body: <p>If I print out a dataframe directly, I get the correct output with correct datatypes. However, when I try to iterate the same dataframe, the datatypes are changing.</p>
  
  <p>Here is my program:</p>
  
  <pre><code>import pandas as pd
  
  F = 9.37556366342
  p = 0.000101673198518
  df_between = 2
  df_within = 471
  df_total = 473
  
  summary_stats_vals = [(F,p,df_between,df_within,df_total)]
  labels = ['F-statistics', 'p-value', 'df-between', 'df-within', 'df-total']
  df = pd.DataFrame.from_records(summary_stats_vals,columns=labels)
  
  print(df)
  print()
  
  #Iterating the dataframe
  for index, row in df.iterrows():
      df_row = list()
      df_row.append(index)
      for col in df.columns:
          df_row.append(row[col])
      print(row)
  </code></pre>
  
  <p>As you can see from the screenshot below, the data types of df_between, df_within and df_total have not been preserved while iterating. They are changing from int to float data type. What is the way I can preserve the data types while iterating a dataframe?</p>
  
  <p><a href="https://i.stack.imgur.com/DIfph.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/DIfph.jpg" alt="enter image description here"></a></p>