Aan de slagGa gratis aan de slag

Calculating array stats

Not only can you perform elementwise calculations on NumPy arrays, you can also calculate summary stats such as mean and standard deviation of arrays using functions from NumPy.

numpy is imported as np and the array prices (from the previous exercise) is available in your workspace.

Deze oefening maakt deel uit van de cursus

Introduction to Python for Finance

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Calculate the mean 
prices_mean = np.____(____)
print(prices_mean)
Code bewerken en uitvoeren