Creation using NumPy functions

It is a common practice to initialize the Series object's various NumPy functions. As an example, the following uses the NumPy np.arange function to create a sequence of integer values between 4 and 8:

The np.linspace() method is similar in functionality but allows us to specify the number of values to be created between (and including) the two specified values, and with a specified number of steps:

It is also common to generate a set of random numbers using np.random.normal(). The following generates five random numbers from a normal distribution:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset