NumPy’s default_rng constructs a random-number generator object. Calling its integers method produces a NumPy array of random integers, making it useful for creating reproducible data for pandas Series exercises. section 1.3
Generate reproducible integers
Create a generator with a seed, then request ten integers from 70 through 100. The upper bound is exclusive, so use 101 to include 100: g = np.random.default_rng(0); values = g.integers(70, 101, 10). Recreating the generator with seed 0 produces the same sequence, which makes examples and comparisons predictable. section 1.3
g = np.random.default_rng(0) g.integers(70, 101, 10) #1
Inspect a concise seeded example that generates ten integers across the required inclusive range. section 1.3
