Created
August 10, 2015 13:00
-
-
Save kidpixo/0601eb4cf5ed50e739ca 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
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