In [1]:
import pandas as pd
import numpy as np
import matplotlib
In [15]:
# Read the data from the csv file using pandas
issues = pd.read_csv("patch_review.csv")
In [16]:
# Display the first 5 issues
issues.head()
Out[16]:
In [27]:
# issues
print("Number of issues with a patch: {0:4d}".format(len(issues)))
In [7]:
#before 2011
i = issues
len(i[(i.activity <= '2011-01-01')])
Out[7]:
In [8]:
# 2011
i = issues
len(i[((i.activity <= '2012-01-01') & (i.activity > '2011-01-01'))])
Out[8]:
In [9]:
# 2012
i = issues
len(i[(i.activity <= '2013-01-01') & (i.activity > '2012-01-01')])
Out[9]:
In [22]:
# 2013
i = issues
len(i[(i.activity <= '2014-01-01') & (i.activity > '2013-01-01')])
Out[22]:
In [10]:
# 2014
i = issues
len(i[(i.activity <= '2015-01-01') & (i.activity > '2014-01-01')])
Out[10]:
In [11]:
# 2015 so far
i = issues
len(i[(i.activity > '2015-01-01')])
Out[11]:
In [12]:
# 2015 so far
i = issues
thisyear = i[(i.activity > '2015-01-01')]
len(thisyear)
Out[12]:
In [14]:
thisyear.head()
Out[14]:
In [29]:
# 2014 created
t = thisyear
len(t[t.creation > '2015-01-01'])
Out[29]:
In [28]:
# 2014 created
t = thisyear
len(t[(t.creation <= '2015-01-01') & (t.creation > '2014-01-01')])
Out[28]:
In [30]:
# 2013 created
t = thisyear
len(t[(t.creation <= '2014-01-01') & (t.creation > '2013-01-01')])
Out[30]:
In [31]:
# 2012 created
t = thisyear
len(t[(t.creation <= '2013-01-01') & (t.creation > '2012-01-01')])
Out[31]:
In [32]:
# 2011 created
t = thisyear
len(t[(t.creation <= '2012-01-01') & (t.creation > '2011-01-01')])
Out[32]:
In [33]:
# 2010 created
t = thisyear
len(t[(t.creation <= '2011-01-01') & (t.creation > '2010-01-01')])
Out[33]:
In [34]:
# Pre-2010 created
t = thisyear
len(t[t.creation <= '2010-01-01'])
Out[34]:
In [35]:
119+74+78+100+170+316+718
Out[35]:
In [ ]:
In [ ]: