Skip to content

Instantly share code, notes, and snippets.

@tommyhuang1
Last active February 12, 2017 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommyhuang1/1548739c63b45b69ac386d640da7fa3f to your computer and use it in GitHub Desktop.
Save tommyhuang1/1548739c63b45b69ac386d640da7fa3f to your computer and use it in GitHub Desktop.
Review Subjectivity
result1=[]
for i in range(len(wiki)):
objective = wiki[i].sentiment.subjectivity
result1.append(objective)
result3=[]
for i in range(len(wiki1)):
objective = wiki1[i].sentiment.subjectivity
result3.append(objective)
result5=[]
for i in range(len(wiki2)):
objective = wiki2[i].sentiment.subjectivity
result5.append(objective)
result7=[]
for i in range(len(wiki3)):
objective = wiki3[i].sentiment.subjectivity
result7.append(objective)
PdGabapentin = pd.Series(result1)
PdClonazepam = pd.Series(result3)
PdTopiramate = pd.Series(result5)
PdPregabalin = pd.Series(result7)
import seaborn as sns
sns.kdeplot(PdGabapentin,label= 'Gabapentin')
sns.kdeplot(PdClonazepam,label= 'Clonazepam')
sns.kdeplot(PdTopiramate,label= 'Topiramate')
sns.kdeplot(PdPregabalin,label= 'Pregabalin')
plt.title('Review Subjectivity')
plt.xlabel('Subjectivity Score (0-1)')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment