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

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:

主站蜘蛛池模板: 襄樊市| 东安县| 淮北市| 通渭县| 陆良县| 麻栗坡县| 松溪县| 吉木萨尔县| 伊吾县| 临颍县| 香港| 黄大仙区| 门头沟区| 遵义县| 平陆县| 阳新县| 塘沽区| 元朗区| 静海县| 化隆| 鹿泉市| 武义县| 襄樊市| 长垣县| 中方县| 灵宝市| 大方县| 上林县| 陕西省| 柞水县| 府谷县| 巩留县| 正蓝旗| 额尔古纳市| 林西县| 高雄县| 酉阳| 盐池县| 衡阳县| 平山县| 富宁县|