DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
fill variable based on values of other variables python
df['new_variable'] = (df['dec'].eq(1) & df['type'].isin([3,2,1])).view('i1')
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#fill
#variable
#based
#values
#variables
#python
ADD COMMENT
Topic
COMMENT
Name
9+6 =
Submit