title: How to loop through the pandas dataframe columns using for loop to count the value based on the list given
body: <p>I would like to loop through a pandas dataframe's columns using a for loop to count the value based on the list given.</p>
  
  <pre><code>My_list =[ 'apple', 'orange', 'grapes' ]
  </code></pre>
  
  <p>I can do it with <code>value_count()</code> functions as given below to calculate frequency</p>
  
  <pre><code>df['Fruits']. value_count() 
  </code></pre>
  
  <p>but I want to calculate using the for loop to iterate over dataframe to get count and average of the list given.</p>
  
  <pre><code>My_list =[ 'apple', 'orange', 'grapes' ] 
  
  Df:   
      Fruits  value
      apple      10
      apple      20 
      orange      2
      grapes      5 
      grapes     10 
      grapes      3
  </code></pre>
  
  <p>My output should be like this.</p>
  
  <pre><code>Fruits    count    average
  apple      2         15 
  orange     1          2 
  grapes     3          6
  </code></pre>