Created
February 12, 2017 20:19
-
-
Save tommyhuang1/6333ef26bc419feecebfd9183fbcbbdd to your computer and use it in GitHub Desktop.
Average Rating Comparison
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
#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