Subsetting elements from an array
Subsetting arrays is similar to subsetting lists. In this exercise, you will practice just that.
numpy
is imported as np
and prices_array
is available in your workspace.
This exercise is part of the course
Introduction to Python for Finance
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Subset the first three elements
prices_subset_1 = prices_array[____:____]
print(prices_subset_1)