title: Get Table from a Web Page with Python
body: <p>Close-to-none knowledge on python web scraping.</p>
  
  <p>I need to get a table from <a href="http://performance.morningstar.com/funds/etf/total-returns.action?t=IWF" rel="nofollow noreferrer">this</a> page:</p>
  
  <pre><code>http://performance.morningstar.com/funds/etf/total-returns.action?t=IWF
  </code></pre>
  
  <p>The table I'm interested in is this:
  <a href="https://i.stack.imgur.com/TFAo2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TFAo2.png" alt="enter image description here"></a>
  (Disregard the chart above the table)</p>
  
  <p>This is what I have now:</p>
  
  <pre><code>from selenium import webdriver
  from bs4 import BeautifulSoup
  
  # load chrome driver
  driver = webdriver.Chrome('C:/.../chromedriver_win32/chromedriver')
  
  # load web page and get source html
  link = 'http://performance.morningstar.com/funds/etf/total-returns.action?t=IWF'
  driver.get(link)
  html = driver.page_source
  
  # make soup and get all tables
  soup = BeautifulSoup(html, 'html.parser')
  tables = soup.findAll('table',{'class':'r_table3'})
  tbl = tables[1]  # ideally we should select table by name
  </code></pre>
  
  <p>Where do I proceed from here?</p>