Guest User

Untitled

a guest
Mar 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. from itertools import product
  2. d = {'ballot1': ['a','b','a','a','b','a','a','b'],
  3. 'ballot1_x':['c','c','d','d','a','a','a','a']}
  4. df1=pd.DataFrame(d)
  5. for i in product(set(df1['ballot1']), set(df1['ballot1_x'])):
  6. print(str(i[0])+str(i[1]))
  7.  
  8. a b
  9. c 1 1
  10. d 2 0
  11. a 2 2
Add Comment
Please, Sign In to add comment