Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iterables = [['milk', 'honey', 'dates'], ['jan', 'feb', 'mar', 'apr']]
- i = pd.MultiIndex.from_product(iterables, names=['good', 'month'])
- xf = pd.DataFrame(index = i)
- xf['price'] = np.random.randint(1, 25, xf.shape[0])
- allocation_vector = pd.Series([0.3, 0.6, 0.1], index = ['milk', 'honey', 'dates'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement