text_plain_output_1.png image_output_1.png
from wordcloud import WordCloud

import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

df = pd.read_csv('../input/books.csv', error_bad_lines=False)
df.shape

author_count = df['authors'].value_counts()[:10]

highest_rated = df.sort_values('ratings_count', ascending=False).head(10).set_index('title')

lowest_rated = df.sort_values('ratings_count', ascending=True).head(10).set_index('title')

from subprocess import check_output
from wordcloud import WordCloud
wordcloud = (WordCloud(width=1440, height=1080, relative_scaling=0.5).generate_from_frequencies(df['language_code'].value_counts()))

fig = plt.figure(1,figsize=(15, 15))
plt.imshow(wordcloud)
plt.axis('off')
plt.show()

df_cdb = df[df['language_code'] == 'fre']
df_cdb.head(5)
plt.figure(figsize=(15, 10))
locs = df_cdb['authors'].value_counts()[:10]
sns.barplot(x=locs, y=locs.index, palette='Set3')
plt.title('Top 10 Authors with most number of books in French Books')
plt.xlabel('Number of Books')