title: Python For Loop DataFrame
body: <p>see below the following code I have at the moment and the error that is coming with it.</p>
  
  <pre><code> companynames = []
  for x in urls:
      website_nametext = requests.get(x)
      all_text = website_nametext.text
      all_soup = BeautifulSoup(all_text, 'html.parser')
      companynames.append(all_soup.h1.get_text())
  overall_data = pd.DataFrame(data=[companynames], columns=['Company Name'])
  </code></pre>
  
  <p>I receive the following error</p>
  
  <pre><code>AssertionError: 1 columns passed, passed data had 3 columns
  </code></pre>
  
  <p>If I was to change the code to put three columns then it allows the dataframe to be created. See below the code.</p>
  
  <pre><code>    companynames = []
  for x in urls:
      website_nametext = requests.get(x)
      all_text = website_nametext.text
      all_soup = BeautifulSoup(all_text, 'html.parser')
      companynames.append(all_soup.h1.get_text())
  overall_data = pd.DataFrame(data=[companynames], columns=['Company Name', 'Company Name', 'Company Name'])
  </code></pre>
  
  <p>However I want the results 'x' , 'y' and 'z' to be in one column and each name on a separate row. rather than there being three separate columns as per my initial code however obviously that is creating an error.</p>
  
  <p>How do I do so?</p>