DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas create column if equals
df['color'] = ['red' if x == 'Z' else 'green' for x in df['Set']]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#pandas
#create
#column
#equals
ADD COMMENT
Topic
COMMENT
Name
4+4 =
Submit