Apr-06-2019, 02:31 AM
2. Write your code to calculate an array called **opening_duration_list**
that stores the opening duration of all medicare offices.
Store the array as a numpy array.
Print the first 10 entries in the array.
that stores the opening duration of all medicare offices.
Store the array as a numpy array.
Print the first 10 entries in the array.
import numpy as np import datetime as datetime x= np.array(data['Close'],dtype=datetime.time) y= np.array(data['Open'], dtype=datetime.time) print((x-y))
Error:ipython-input-76-c1a1ba0f9f3c> in <module>
3 x= np.array(data['Close'],dtype=datetime.time)
4 y= np.array(data['Open'], dtype=datetime.time)
----> 5 print((x-y))
6
7
TypeError: unsupported operand type(s) for -: 'str' and 'str'