Skip to content

Instantly share code, notes, and snippets.

@kocur4d
Last active May 28, 2018 15:20
Show Gist options
  • Save kocur4d/8986542eee8834ff7b3c02e08c68ea73 to your computer and use it in GitHub Desktop.
Save kocur4d/8986542eee8834ff7b3c02e08c68ea73 to your computer and use it in GitHub Desktop.
Python stuff
# count the number of expected result
sum(record.outcome == 1 for record in data.records)
# Count the values
df.column_name.value_counts()
# or
df.groupby('column_name').count()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment