index = pd.MultiIndex.from_tuples(list(product(individuals, time)))
df = pd.DataFrame(data={'A': np.random.random(size=2000), 'B': np.random.
    random(size=2000)}, index=index)
Sampling from MultiIndex DataFrame