Python-生成随机数的方法

一、Python自带的random模块

1.1 生成随机整数、浮点数

  • random.random

  • random.uniform

  • random.randint

  • random.randrange

  • random.choice

  • random.shuffle

  • random.sample

二、Numpy中的random

三、Pandas中的random

四、区别

部分内容参考自(https://www.cnblogs.com/twilight77/p/7675512.html),本学习笔记后续会持续更新,如果你有更好的方案,欢迎留言讨论。

你可能感兴趣的:(Python-生成随机数的方法)