October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code plots the time series chart of the Google Stock Price:
stock = pd.read_csv('GOOG.csv', header=None, delimiter=',')
stock.columns = ['date','price']
stock['date'] = pd.to_datetime(stock['date'], format='%d-%m-%Y')
indexed_stock = stock.set_index('date') ts = indexed_stock['price']
plt.plot(ts)
plt.show()
Read now
Unlock full access