官术网_书友最值得收藏!

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:

主站蜘蛛池模板: 盐源县| 綦江县| 清水河县| 敦煌市| 藁城市| 明水县| 罗定市| 青岛市| 广水市| 桂平市| 凯里市| 禹州市| 阜新市| 工布江达县| 邛崃市| 英德市| 五华县| 浮山县| 景谷| 城固县| 阳信县| 寻甸| 秭归县| 沂南县| 布尔津县| 屏东市| 吴忠市| 罗甸县| 北流市| 台湾省| 内乡县| 和顺县| 驻马店市| 银川市| 林西县| 大方县| 永康市| 丰都县| 崇信县| 多伦县| 丽水市|