title: Problem with dataframe using beautiful soup
body: <p>I create a dataframe using beautiful soup scraping the data. However, there have 2 problems.</p>
  <ol>
  <li>Why does the for loop run 2 times?</li>
  <li>How to remove the brackets on the data frame?</li>
  </ol>
  <p>import urllib.request as req</p>
  <pre><code>from bs4 import BeautifulSoup
  import bs4
  import requests
  import pandas as pd
  
  url = &quot;https://finance.yahoo.com/quote/BF-B/profile?p=BF-B&quot;
  
  root = requests.get(url)
  
  soup = BeautifulSoup(root.text, 'html.parser')
  
  records = []
  
  for result in soup:
  name = soup.find_all('h1', attrs={'D(ib) Fz(18px)'})
  website = soup.find_all('a')[44]
  sector = soup.find_all('span')[35]
  industry = soup.find_all('span')[37]
  records.append((name, website, sector, industry))
  
  df = pd.DataFrame(records, columns=['name', 'website', 'sector', 'industry'])
  df.head()
  </code></pre>
  <p>And the result like this:</p>
  <p><a href="https://i.stack.imgur.com/7NuyV.png" rel="nofollow noreferrer">DataFrame Output</a></p>