Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created June 5, 2020 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/eb7f892bc3b1d955c5d5f94be379dc53 to your computer and use it in GitHub Desktop.
Save aniruddha27/eb7f892bc3b1d955c5d5f94be379dc53 to your computer and use it in GitHub Desktop.
# function to check output percentage for a rule
def output_per(df,out_col):
result = 0
for out in df[out_col]:
if len(out)!=0:
result+=1
per = result/len(df)
per *= 100
return per
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment