DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
dataframe number of unique rows
1
# get the unique values (rows) by retaining last row
2
df
.
drop_duplicates
(
keep
=
'last'
)
Source by www.datasciencemadesimple.com #
PREVIOUS
NEXT
Tagged:
#dataframe
#number
#unique
#rows
ADD COMMENT
Topic
COMMENT
Name
3+5 =
Submit