01234 Name 10-Day Green Smoothie Cleanse 11/22/63: A Novel 12 Rules for Life: An Antidote to Chaos 1984 (Signet Classics) 5,000 Awesome Facts (About Everything!) (Natio... Author J Smith Stephen King Jordan B. Peterson George Orwell National Geographic Kids User Rating 4.74.64.74.74.8 Reviews 17350205218979214247665 Price 82215612 Year 20162011201820172019 Genre Non Fiction Fiction Non Fiction Fiction Non Fiction
Count Mean Std Min 25%50%75% Max Price 55013.110.84071116105 Reviews 55011953.2811731.13374058858017253.2587841 User Rating 5504.610.223.34.54.74.84.9
Python 分析数据集
数值数据行为
简述:使用Python探索畅销图书的评价和评分,直方图显示。
#distribution type books that goes hits by year (fiction / non fiction )
df_books = df.groupby(['Genre','Year']).agg({'Name':'nunique'}).reset_index()
ax = sns.barplot(x="Year", y="Name", hue='Genre', data=df_books)
sns.set(rc={'figure.figsize':(15,9)})
ax.set(xlabel='Year', ylabel='Total Books')
autolabel(ax.patches, labels= df_books.Name, height_factor=1.02)
ax.legend(loc=1, bbox_to_anchor=(1.0,1.1))
plt.title('Distribution of Total Books by Genre per Year') # Set the title