petition_votes = petitions.groupby(['start'])['votes'].sum().reset_index() petition_votes.columns = ['start', 'votes'] petition_votes.head()
실행 결과
|
start |
votes |
0 |
2017-08-19 |
20703 |
1 |
2017-08-20 |
31710 |
2 |
2017-08-21 |
1884 |
3 |
2017-08-22 |
2607 |
4 |
2017-08-23 |
13446 |