Skip to content

Instantly share code, notes, and snippets.

@dgnsrekt
Created June 27, 2018 18:55
Show Gist options
  • Save dgnsrekt/880d8fccda449b56ac96f27bae42e748 to your computer and use it in GitHub Desktop.
Save dgnsrekt/880d8fccda449b56ac96f27bae42e748 to your computer and use it in GitHub Desktop.
# percent change = new - old / old * 100
dataframe['percent_change'] = (
dataframe['Last'] - dataframe['PrevDay']) / dataframe['PrevDay'] * 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment