DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas drop duplicates but keep most recent date
df.sort_values('DATE_CHANGED').drop_duplicates('STATION_ID',keep='last')
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#pandas
#drop
#duplicates
#date
ADD COMMENT
Topic
COMMENT
Name
1+9 =
Submit