July 2017
Beginner to intermediate
420 pages
10h 56m
English
Now, NumPy also makes it incredibly easy to compute the standard deviation and variance. If you want to compute the actual standard deviation of this dataset that we generated, you just call the std function right on the dataset itself. So, when NumPy creates the list, it's not just a normal Python list, it actually has some extra stuff tacked onto it so you can call functions on it, like std for standard deviation. Let's do that now:
incomes.std()
This gives us something like the following output (remember that we used random data, so your figures won't be exactly the same as mine):
20.024538249134373
When we execute that, we get a number pretty close to 20, because that's what ...
Read now
Unlock full access