I have a dataframe like this:
Date PlumeO Distance
2014-08-13 13:48:00 754.447905 5.844577
2014-08-13 13:48:00 754.447905 6.888653
2014-08-13 13:48:00 754.447905 6.938860
2014-08-13 13:48:00 754.447905 6.977284
2014-08-13 13:48:00 754.447905 6.946430
2014-08-13 13:48:00 754.447905 6.345506
2014-08-13 13:48:00 754.447905 6.133567
2014-08-13 13:48:00 754.447905 5.846046
2014-08-13 16:59:00 754.447905 6.345506
2014-08-13 16:59:00 754.447905 6.694847
2014-08-13 16:59:00 754.447905 5.846046
2014-08-13 16:59:00 754.447905 6.977284
2014-08-13 16:59:00 754.447905 6.938860
2014-08-13 16:59:00 754.447905 5.844577
2014-08-13 16:59:00 754.447905 6.888653
2014-08-13 16:59:00 754.447905 6.133567
2014-08-13 16:59:00 754.447905 6.946430
我试图保留日期之间的最小距离,因此删除重复日期并保留最小距离。
在pandas的df.drop_duplicates
中是否有实现这一目标的方法,或者我必须使用if语句来查找最小距离?