Skip to content

Instantly share code, notes, and snippets.

@anthonymorast
Created August 17, 2021 18:55
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 anthonymorast/0fdcc30b69253047570f20800603a9f7 to your computer and use it in GitHub Desktop.
Save anthonymorast/0fdcc30b69253047570f20800603a9f7 to your computer and use it in GitHub Desktop.
def percent_profitable(data):
return len(data.loc[data.profit > 0]) / len(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment