0
friends, how should I correct this?
import numpy as np import numpy_financial as npf prices = [3869.47, 7188.46, 22203.31, 29391.78] res = np.std(prices) print(res)
4 Antworten
+ 3
The only difference is the variable name for the standard deviation.
+ 2
That depends on what you're trying to do. Your code runs fine and outputs the standard deviation of the values in prices.
+ 1
Simon Sauter Dankeschön
0
Simon Sauter Is there a difference with the code above and this one:
import numpy as np
import numpy_financial as npf
prices = [3869.47, 7188.46, 22203.31, 29391.78]
x = np.std(prices)
print(x)