Skip to content

Instantly share code, notes, and snippets.

@kidpixo
Created August 10, 2015 13:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kidpixo/0601eb4cf5ed50e739ca to your computer and use it in GitHub Desktop.
Save kidpixo/0601eb4cf5ed50e739ca to your computer and use it in GitHub Desktop.
builds = pd.DataFrame.from_csv(url,parse_dates=['StartedAt', 'FinishedAt'],index_col=9)
# quick and dirty
builds.groupby(builds.index.week).State.value_counts()
29 passed 4
31 failed 4
35 errored 3
failed 3
# a little better
print '-'*10
grouped = builds.groupby(builds.index.week)
for name, group in grouped:
print 'Week N.%s :' %name
print group.State.value_counts()
print '-'*10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment