pandas and NumPy 3 · NumPy

Generate random numbers

Use the modern generator with a seed so results can be reproduced.

rng = np.random.default_rng(42)
rng.normal(size=5)
rng.integers(0, 10, size=3)

Official pandas and NumPy 3 documentation

More numpy commands

All numpy commands · pandas and NumPy 3 cheatsheet

Was this page helpful?