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

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:

主站蜘蛛池模板: 乌兰浩特市| 农安县| 衡东县| 格尔木市| 同仁县| 鹤壁市| 大田县| 永泰县| 玉龙| 连州市| 哈尔滨市| 益阳市| 明光市| 万盛区| 桐庐县| 吉安市| 萍乡市| 西乡县| 霞浦县| 维西| 舒兰市| 张家界市| 孙吴县| 冕宁县| 凤城市| 宣汉县| 拜泉县| 石嘴山市| 金乡县| 琼结县| 汽车| 龙口市| 恭城| 湖州市| 鄄城县| 舞钢市| 阿坝县| 且末县| 大同县| 永康市| 沽源县|