DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
if condition dataframe python
df
.
loc
[
df
[
'age1'
]
-
df
[
'age2'
]
>
0
,
'diff'
]
=
df
[
'age1'
]
-
df
[
'age2'
]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#condition
#dataframe
#python
ADD COMMENT
Topic
COMMENT
Name
1+6 =
Submit