-
-
Save anthonymorast/79da6a9ab8ed32b837a34fefd47272fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def best_returns_wrt_start_price(data): | |
data["pct_return_start"] = data["profit"]/data["start_price"] | |
return data.sort_values(by=["pct_return_start"], ascending=False)[:5] # top 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment