DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
remove repetitive characters from the specified column of a given DataFrame
cols = ["col1","col2","col3"] de_dup = a[cols].loc[(a[cols].shift() != a[cols]).any(axis=1)]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#remove
#repetitive
#characters
#column
#DataFrame
ADD COMMENT
Topic
COMMENT
Name
7+1 =
Submit