Jovian
⭐️
Sign In
In [1]:
import numpy as np
import pandas as pd
In [12]:
data = pd.read_csv("books2.csv");
In [13]:
data.head()
Out[13]:
In [14]:
data["average_rating"] = data["average_rating"].astype(float)
In [15]:
data[(data["language_code"]=="eng") & (data["# num_pages"]>300) & (data["average_rating"]>4) & (data["ratings_count"]>1500000)]
Out[15]:
In [23]:
data[(data["average_rating"]>=5)&(data["language_code"]=="eng")]["authors"]
Out[23]:
879                       Julie Sylvester-David Sylvester
963                                        Tara MacCarthy
1442                 Middlesex Borough Heritage Committee
1624                                      Svetlana Alpers
2988                                    Frederick P. Lenz
4940                                           Tim Bogenn
6157                     Aaron Rosenberg-Christopher Cook
6159    Laura Driscoll-Alisa Klayman-Grodsky-Eric     ...
6632                                        Keith Donohue
6764                                    James E. Campbell
6809                                  Sheri Rose Shepherd
7247                                     Sara Barton-Wood
8140            Chris Jiggins-Pablo Andrade-Eduardo Cueva
Name: authors, dtype: object
In [18]:
data.iloc[2]
Out[18]:
bookID                                                                3
title                 Harry Potter and the Sorcerer's Stone (Harry P...
authors                                      J.K. Rowling-Mary GrandPré
average_rating                                                     4.47
isbn                                                          439554934
isbn13                                                    9780439554930
language_code                                                       eng
# num_pages                                                         320
ratings_count                                                   5629932
text_reviews_count                                                70390
Unnamed: 10                                                         NaN
Name: 2, dtype: object
In [25]:
import jovian
In [ ]:
jovian.commit()
[jovian] Saving notebook..
In [ ]: