Skip to content

Instantly share code, notes, and snippets.

@tommyhuang1
Created February 12, 2017 20:19
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/6333ef26bc419feecebfd9183fbcbbdd to your computer and use it in GitHub Desktop.
Save tommyhuang1/6333ef26bc419feecebfd9183fbcbbdd to your computer and use it in GitHub Desktop.
Average Rating Comparison
#Plot Average Rating for all drugs
AvgRating=[DataWithRating.mean(),DataWithRating1.mean(),DataWithRating2.mean(),DataWithRating3.mean()]
DrugAvgRating = pd.DataFrame(AvgRating, index=['Gabapentin','Clonazepam','Topiramate','Pregabalin'])
DrugAvgRating.plot.barh()
plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0)
plt.title('Average Rating Comparison')
plt.xlabel('Average Rating')
plt.ylabel('Drugs')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment