Search
 
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
Name
9+6 =