Skip to content

Instantly share code, notes, and snippets.

@arunm8489
Created July 31, 2020 14:08
Show Gist options
  • Save arunm8489/96212fbf07842d69099d8cfd722a7b3d to your computer and use it in GitHub Desktop.
Save arunm8489/96212fbf07842d69099d8cfd722a7b3d to your computer and use it in GitHub Desktop.
def presence_number(data):
presence = any(char.isdigit() for char in data)
if presence is True :
return 1
elif presence is False :
return 0
return 0
data['presence_of_num'] = data['project_resource_summary'].map(lambda x : presence_number(x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment