1import yfinance as yf
2import matplotlib.pyplot as plt
3# Get the data for the stock Apple by specifying the stock ticker, start date, and end date
4data = yf.download('AAPL','2016-01-01','2018-01-01')
5# Plot the close prices
6data.Close.plot()
7plt.show()