A random seed is an initial value that starts a pseudorandom-number generator. Reusing the same seed produces the same sequence, making generated data reproducible. section 1.3
Recreate the same random data
Create two NumPy generators with seed 0 and draw the same ten integers. The resulting arrays match, so both exercises can be compared reliably. Use the generated values to construct a pandas Series. section 1.3
g = np.random.default_rng(0) #1 a = g.integers(0, 100, 10) #2 g = np.random.default_rng(0) #3 b = g.integers(0, 100, 10) #4 a == b #5
This listing demonstrates that resetting np.random.default_rng(0) reproduces the same sequence of integers. section 1.3
Prefer passing the seed to np.random.default_rng and working with its generator object. The older np.random.seed function still exists, but NumPy developers discourage using it. section 1.3

