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