回答編集履歴
1
修正
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
`.sort_values()`
|
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
|
|