Skip to content

Instantly share code, notes, and snippets.

@naenumtou
Created July 27, 2020 06:50
Show Gist options
  • Save naenumtou/060d81d4684be6a0e5a2f712eb416190 to your computer and use it in GitHub Desktop.
Save naenumtou/060d81d4684be6a0e5a2f712eb416190 to your computer and use it in GitHub Desktop.
def checking(df):
if df['test'] < 50:
flag = 1
else:
flag = 0
return flag
df['apply_1'] = df.apply(checking, axis = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment