Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- df = pd.DataFrame({
- 'A' : np.random.randn(6),
- 'B' : np.random.randn(6),
- 'Date' : ['2019-02-28', '2019-02-28','2019-02-28','2019-03-29','2019-03-
- 29','2019-03-29'],
- 'Name' :['jack','henry','phil','phil','henry','jack']
- })
- df.set_index(['Date','Name'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement