title: Trying to extract a table from webpage using BeautifulSoup (table inconsistent with real data)
body: <p>So far I have exported the link to my notebook are parsed the phrase using beautiful soup:</p>
  <pre><code>html_data = requests.get('https://www.macrotrends.net/stocks/charts/TSLA/tesla/revenue')
  soup = BeautifulSoup(html_data.text, 'lxml')
  </code></pre>
  <p>Then I tried to basically make a table that's only containing revenue (Telsa Quarterly Revenue) here (trying to omit Nan values):</p>
  <pre><code>tesla_revenue = pd.DataFrame(columns=[&quot;Date&quot;, &quot;Revenue&quot;])
  table = soup.find('table', attrs={'class': 'historical_data_table table'})
  for result in table:
      if table.find('th').getText().startswith(&quot;Tesla Quarterly Revenue&quot;):
          for row in result.find_all('tbody').find_all(&quot;tr&quot;):
              col = row.find(&quot;td&quot;)
              if len(col) != 2: continue
              Date = col[0].text
              Revenue = col[1].text
              tesla_revenue = tesla_revenue.append({&quot;Date&quot;:Date,  &quot;Revenue&quot;:Revenue}, ignore_index=True)
  
  tesla_revenue = tesla_revenue.apply (pd.to_numeric, errors='coerce')
  tesla_revenue = tesla_revenue.dropna()
  </code></pre>
  <p>Then when I tried to print out the tail of the table, I just get this:</p>
  <p>| Date | Revenue |</p>
  <p>(<em>only the headers</em>)</p>
  <p>I think I might done something wrong when I made my table, but I can't be sure. Any help would be appreciated.</p>