## Analyzing Stock Data with Numpy – The Reshape and Average Functions

Daily Data Science Puzzle [python] import numpy as np # apple stock prices (May 2018) prices = [ 189, 186, 186, 188, 187, 188, 188, 186, 188, 188, 187, 186 ] prices = np.array(prices) data_3day = prices.reshape(4,3) print(int(np.average(data_3day[0]))) print(int(np.average(data_3day[-1]))) [/python] What is the output of this puzzle? Numpy is a popular Python library for data …

Analyzing Stock Data with Numpy – The Reshape and Average Functions Read More »