In [11]:
import os
os.listdir()
import warnings
warnings.filterwarnings('ignore')
import pandas as pd
import numpy as np
import matplotlib as plt
import seaborn as sns
import matplotlib.pyplot as pyp
pd.set_option('max_columns', 50)
#Inline imaging
%matplotlib inline
In [12]:
df = pd.read_csv('closed_issue_comments.csv', delimiter='|')
#df.set_index('issue_number', inplace=True)
df.head(3)
Out[12]:
In [48]:
comm_nums = df[(df['number_of_comments'] < 15)]
In [52]:
data = [comm_nums.index, comm_nums['number_of_comments']]
jp = sns.jointplot(x=comm_nums.index, y=(comm_nums['number_of_comments']), kind="reg", ylim=(0, 15), size=20)
jp.savefig('issue-comment-regression')
#jp = sns.jointplot(x="Issue Number", y="number_of_comments", data=data, kind="reg", ylim=(0, 10), size=20)
In [32]:
#import matplotlib.pyplot as pyp
plt.pyplot.style.use('ggplot')
new_df = df[['number_of_comments']]
cs=plt.cm.Set1(np.arange(40)/40)
#print(pyp.style.available)
pyp.figure(figsize=(13, 13))
a = new_df['number_of_comments'].value_counts()
b = pyp.pie(a, labels=a.index, colors=cs, autopct='%1.1f%%', shadow=True)
pyp.legend(a.index, bbox_to_anchor=(1.1, 1.05))
pyp.axis("equal")
pyp.tight_layout()
pyp.savefig('issue-comments-pie')
In [ ]:
In [ ]: