Skip to content

Instantly share code, notes, and snippets.

@dhesse
Created October 30, 2015 09:07
Show Gist options
  • Save dhesse/f7d5584cdcf50d5a3220 to your computer and use it in GitHub Desktop.
Save dhesse/f7d5584cdcf50d5a3220 to your computer and use it in GitHub Desktop.
# you'll need the Greenville gist as well:
# https://gist.github.com/dhesse/aa2e2425548bf3e4ceb7
from greenville import compareVisuallyToBenford, data
doubleDigitCounts = data\
.Amount[data.Amount >= 10]\
.apply(lambda x: int(str(x)[:2]))\
.value_counts()
compareVisuallyToBenford(doubleDigitCounts, 'Counts of First Two Digits')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment