Python Numpy 101: How to Index Elements in Numpy Arrays?

Daily Data Science Puzzle [python] import numpy as np # air quality index AQI data hong_kong = np.array( [ 42, 40, 41, 43, 44, 43 ]) new_york = np.array( [ 30, 31, 29, 29, 29, 30 ]) montreal = np.array( [ 11, 11, 12, 13, 11, 12 ]) hk_mean = (hong_kong[0] + hong_kong[-1]) / 2.0 …

Python Numpy 101: How to Index Elements in Numpy Arrays? Read More »