O'Reilly logo

Learning pandas by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Useful numerical methods of NumPy arrays

NumPy arrays have many functions that can be applied to the arrays. Many of these are statistical functions that you can use for data analysis. The following example describes several of the useful functions.

Note

Note that most of these functions work on multi-dimensional arrays, and the axis to which the function is applied to is specified by the axis parameter. We will examine this for the .min() and .max() functions, but note that the axis parameter applies to many other NumPy functions.

The .min() and .max() methods return the minimum and maximum values in an array. The .argmax() and .argmin() functions return the position of the maximum or minimum value in the array:

In [82]:
 # demonstrate some of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required