concept ndarray object in category pandas

appears as: ndarray object, The ndarray object
Pandas in Action

This is an excerpt from Manning's book Pandas in Action.

The nested objects are available as attributes on our Series. For example, the values attribute returns the ndarray object that stores the values.

In  [12] diet.values
 
Out [12] array([125, 406, 342])

We can pass any object to Python's built-in type function to see the class it is constructed from. Notice the ndarray is coming from NumPy, not from Pandas. The ndarray object optimizes for speed and efficiency by relying on the lower-level C programming language for many of its calculations.

To reverse the values, provide a [::-1] after the ndarray object. This syntax is inspired by Python's list-slicing syntax. It iterates across the range from the last value to the first value in steps of 1. Below, we use it to create a list of descending numbers.