title: When doing Pandas DataFrame Calculations top row returns all zeros and all other rows correct
body: <p>I am writing a function that takes a dataframe and concatenates a second dataframe next to the original dataframe with a simple calculation of percentages. I want to have the rows simply be values followed by percentages. Here is an example:</p>
  
  <pre><code>A,   B,   A (%),   B (%)
  1,   1,    0.50,     0.50  
  1,   1,    0.50,     0.50
  </code></pre>
  
  <p>But instead my code is returning:</p>
  
  <pre><code>A,   B,   A (%),   B (%)
  1,   1,     0 ,      0  
  1,   1,    .50 ,    .50
  </code></pre>
  
  <p>The first row in and sized dataframe that I do this with returns a row of zeros and then the calculations that follow in later rows are all correct. The code I am running deals with a dataframe that has 3 columns containing values... Count, IV, P are their titles. 
  I have attached the code below:</p>
  
  <pre><code>    column_list = []
  for column in frame.columns[1:]:
      column_list.append(column + ' (%)')
  
  percentages = pd.DataFrame(columns = column_list)
  for i in range(frame.shape[0]):
      percentages.loc[i] = [float(frame.iloc[i,1])/float(frame['Count'].sum()), 
  float(frame.iloc[i,2])/float(frame['IV'].sum()), 
  float(frame.iloc[i,3])/float(frame['P'].sum())]
  
  return_frame = pd.concat([frame,percentages], axis = 1)
  
  
  return return_frame
  </code></pre>