title: How to iterate over each individual column values in multiple column dataframe?
body: <p>I have multiple column data frame with columns <strong>['Country', 'Energy Supply', 'Energy Supply per Capita', '% Renewable']</strong>.</p>
  
  <p>In the energy supply column, I want to convert the unit of the column to Peta from Giga. But in the process
  <code>energy['Energy Supply']*= energy['Energy Supply']</code>, when the value is like "...." (missing value is denoted by this), is also getting multiplied or say duplicated. Also, the string value in the column is also getting multiplied. (For eg original: Peta, after operation: PetaPetaPetaPeta...).</p>
  
  <p>To stop this from happening, I am running this:</p>
  
  <pre><code>energy = pd.read_excel("Energy Indicators.xls",skiprows = 16, skip_footer = 38)
  energy.drop(['Unnamed: 0','Unnamed: 1'],axis = 1, inplace = True)
  energy.columns = ['Country', 'Energy Supply', 'Energy Supply per Capita', '% Renewable']
  for i in energy['Energy Supply']:
      if (isinstance(energy[i],int) == True):
          energy['Energy Supply'][i]=energy['Energy Supply'][i]*1000000
  return (energy)
  </code></pre>
  
  <p>But I am not getting the result i.e. to change the value of integer type variables only, and nothing is changing.</p>
  
  <p>Where I think the problem lies in, the first two rows will give the<strong>false</strong> condition, as first rows are "String" and based on that, the program is not modifying the values, whereas I want to individually check if the value is of integer type and if it is, Multiplies the number by 1,000,000. </p>
  
  <p>Input:</p>
  
  <pre><code>    Country        Energy Supply    Energy Supply per Capita    % Renewable
  0   NaN             Petajoules            Gigajoules                 %
  1   Afghanistan        321                   10                  78.6693
  2   Albania            102                   35                    100
  3   Algeria            1959                  51                  0.55101
  4   American Samoa      ...                 ...                  0.641026
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>    Country        Energy Supply    Energy Supply per Capita    % Renewable
  0   NaN             Petajoules            Gigajoules                 %
  1   Afghanistan        3210000                10                     78.6693
  2   Albania            1020000                35                      100
  3   Algeria            19590000               51                     0.55101
  4   American Samoa      ...                 ...                    0.641026
  </code></pre>
  
  <p>Current Output:</p>
  
  <pre><code>    Country        Energy Supply    Energy Supply per Capita    % Renewable
  0   NaN             PetajoulesPeta.         Gigajoules               %
  1   Afghanistan        3210000                10                   78.6693
  2   Albania            1020000                35                    100
  3   Algeria            19590000               51                   0.55101
  4   American Samoa      ........                ...                0.641026
  </code></pre>