DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas columns case when equivalent
df['c'] = np.select( [ (df['a'].isnull() & (df['b'] == 0)) ], [ 1 ], default=0 )
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#pandas
#columns
#case
#equivalent
ADD COMMENT
Topic
COMMENT
Name
7+5 =
Submit