title: Python:Data Frame object is not iterable
body: <p>I tried to create a function that takes a filename as input and just read it using pandas. However, as i run the program it throws the error.
  Here is my code:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import csv
  import re
  
  product_description=[]
  category=[]
  
      def get_data(filename):
          with open(filename,'r') as excelfile:
              excelfilereader=pd.read_excel(filename)
              next(excelfilereader)
              for rows in excelfilereader:
                  product_description.append(str[rows][0])
                  category_description.append(str[rows][1])
              return print(product_description)
  
  
  
  
  get_data('D:\\android\\data1.xlsx')
  </code></pre>
  
  <p>Here is the error:</p>
  
  <pre><code>TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-5-db04dbb9b801&gt; in &lt;module&gt;()
       16         return print(product_description)
       17 
  ---&gt; 18 get_data('D:\\android\\data1.xlsx')
       19 
  
  &lt;ipython-input-5-db04dbb9b801&gt; in get_data(filename)
       10     with open(filename,'r') as excelfile:
       11         excelfilereader=pd.read_excel(filename)
  ---&gt; 12         next(excelfilereader)
       13         for rows in excelfilereader:
       14             product_description.append(str[rows][0])
  
  TypeError: 'DataFrame' object is not an iterator
  </code></pre>