import pandas as pd import numpy as np
s = pd.Series(np.random.randint(1, 10, 40)) print(s) 0 6 1 8 2 2 3 7 4 7 5 9 6 9 7 7 8 2 9 2