Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Product Step
- 1 1
- 1 3
- 1 6
- 1 6
- 1 8
- 1 1
- 1 4
- 2 2
- 2 4
- 2 8
- 2 8
- 2 3
- 2 1
- 3 1
- 3 3
- 3 6
- 3 6
- 3 8
- 3 1
- 3 4
- import pandas as pd
- sid = pd.DataFrame(data.groupby('Product').apply(lambda x: x['Step'].unique())).reset_index()
- Product 0
- 0 1 [1 3 6 8 4]
- 1 2 [2 4 8 3 1]
- 2 3 [1 3 6 8 4]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement