title: Converting scraped text into Pandas data frame with BeautifulSoup
body: <p>I am extracting some text from a website using the code below. I have it in the form of a string.</p>
  
  <pre><code>import requests
  URL = 'https://www.instituteforsupplymanagement.org/about/MediaRoom/newsreleasedetail.cfm?ItemNumber=30655&amp;SSO=1'
  r = requests.get(URL)
  page = r.text
  
  from bs4 import BeautifulSoup
  soup = BeautifulSoup(page, 'lxml')
  import re
  
  strong_el = soup.find('strong',text='WHAT RESPONDENTS ARE SAYING …')
  
  ul_tag = strong_el.find_next_sibling('ul')
  LI_TAG =''
  for li_tag in ul_tag.children:
  
      LI_TAG += li_tag.string
  
  print LI_TAG
  </code></pre>
  
  <p>I am trying to create a data frame with 2 columns: 1) Comments 2) Industry (sub-string within the brackets).
  Getting some error when I tried to use <a href="https://stackoverflow.com/a/22605281/4399016">StringIO</a> as follows: 'TypeError: data argument can't be an iterator'. How can I convert these comments into a data frame?</p>
  
  <pre><code>import sys
  if sys.version_info[0] &lt; 3: 
      from StringIO import StringIO
  else:
      from io import StringIO
  
  import pandas as pd
  
  LI_TAG = StringIO(LI_TAG)
  df = pd.DataFrame(LI_TAG)
  </code></pre>