DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas assign value to row based on condition
df.loc[df['stream'] == 2, ['feat','another_feat']] = 'a', 'b'
PREVIOUS
NEXT
Tagged:
#pandas
#assign
#row
#based
#condition
ADD COMMENT
Topic
COMMENT
Name
1+3 =
Submit