Tkinter-based backend 

Let's try to copy the following code to a separate text file and name it chapter6_gui.py. After that, type python chapter6_gui.py in your terminal (Mac/Linux) or Command Prompt (Windows). If you are unsure about how to open a terminal or Command Prompt, refer to Chapter 6, Hello Plotting World!, for more details:

import matplotlibimport matplotlib.pyplot as pltimport textwrap # Standard library for text wrapingimport requestsimport pandas as pdfrom bs4 import BeautifulSoup# Specify the urlurl = "https://www.bls.gov/emp/ep_table_001.htm"# Query the website and get the html responseresponse = requests.get(url)# Parse the returned html using BeautifulSoupbs = BeautifulSoup(response.text)# Select the table header by CSS ...

Get Numerical Computing with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.