Answers for "how to define if a data within in a dataframe python"

3

if condition dataframe python

df.loc[df['age1'] - df['age2'] > 0, 'diff'] = df['age1'] - df['age2']
Posted by: Guest on May-20-2020

Code answers related to "how to define if a data within in a dataframe python"

Python Answers by Framework

Browse Popular Code Answers by Language