回答編集履歴

1

修正

2019/01/30 08:57

投稿

can110
can110

スコア38266

test CHANGED
@@ -1,4 +1,4 @@
1
- `.sort_values()``.drop_duplicates(~ keep='last')`でできます。
1
+ `.sort_values()`でいったん日付順に並べ替えた後に`.drop_duplicates(~ keep='last')`でできます。
2
2
 
3
3
  参考:[How do I drop duplicates and keep the last timestamp on pandas](https://stackoverflow.com/questions/49425727/how-do-i-drop-duplicates-and-keep-the-last-timestamp-on-pandas)
4
4