Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_dataframe_votes(votes=[[1,1], [1,1], [0,1], [1,0]], rows=['A', 'B', 'C', 'D'], ballots=['Ballot1', 'Ballot2']):
- df = pd.DataFrame(votes, columns=ballots)
- df.index = ['A', 'B', 'C', 'D']
- return df
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement