In [8]:
import numpy as np
import pandas as pd

from sklearn.impute import SimpleImputer
In [10]:
df = pd.read_csv('googleplaystore.csv')
# df.isna().sum()
impute = SimpleImputer(missing_values = np.nan , strategy = 'mean')
impute.fit(df.iloc[ : , 2:3 ].values)
df.iloc[ : , 2:3 ] = impute.transform(df.iloc[ : , 2:3 ].values)

df = df.dropna()
In [11]:
df.head()
Out[11]:
App Category Rating Reviews Size Installs Type Price Content Rating Genres Last Updated Current Ver Android Ver
0 Photo Editor & Candy Camera & Grid & ScrapBook ART_AND_DESIGN 4.1 159 19M 10,000+ Free 0 Everyone Art & Design January 7, 2018 1.0.0 4.0.3 and up
1 Coloring book moana ART_AND_DESIGN 3.9 967 14M 500,000+ Free 0 Everyone Art & Design;Pretend Play January 15, 2018 2.0.0 4.0.3 and up
2 U Launcher Lite – FREE Live Cool Themes, Hide ... ART_AND_DESIGN 4.7 87510 8.7M 5,000,000+ Free 0 Everyone Art & Design August 1, 2018 1.2.4 4.0.3 and up
3 Sketch - Draw & Paint ART_AND_DESIGN 4.5 215644 25M 50,000,000+ Free 0 Teen Art & Design June 8, 2018 Varies with device 4.2 and up
4 Pixel Draw - Number Art Coloring Book ART_AND_DESIGN 4.3 967 2.8M 100,000+ Free 0 Everyone Art & Design;Creativity June 20, 2018 1.1 4.4 and up

Q1. How many free apps are there in ART_AND_DESIGN?¶

In [13]:
df_pr = df[df['Category'] == 'ART_AND_DESIGN']
print("There are ",len(df_pr[df_pr['Type'] == 'Free']) , "Free Apps in ART_AND_DESIGN Category.")
There are  61 Free Apps in ART_AND_DESIGN Category.

Q2. How many apps are there in ART_AND_DESIGN with rating more then 4.5?¶

In [14]:
df_pr = df[df['Category'] == 'ART_AND_DESIGN']
print("There are ",len(df_pr[df_pr['Rating'] > 4.5]) , " Apps in ART_AND_DESIGN Category with rating > 4.5 .")
There are  22  Apps in ART_AND_DESIGN Category with rating > 4.5 .

Q3. How many apps are there in FAMILY with rating more then 4.5 and Free?¶

In [21]:
df_pr = df[df['Category'] == 'FAMILY']
df_pr = df_pr[df_pr['Rating'] > 4.5]

print(len(df_pr[df_pr['Type'] == 'Free']))
314

Q4. List all the free apps with rating more then 4.5 and category is FAMILY?¶

In [22]:
df_pr = df[df['Category'] == 'FAMILY']
df_pr = df_pr[df_pr['Rating'] > 4.5]

df_pr[df_pr['Type'] == 'Free']
Out[22]:
App Category Rating Reviews Size Installs Type Price Content Rating Genres Last Updated Current Ver Android Ver
2020 Super ABC! Learning games for kids! Preschool ... FAMILY 4.6 20267 46M 1,000,000+ Free 0 Everyone Educational;Education July 16, 2018 1.1.6.7 4.1 and up
2023 Candy Pop Story FAMILY 4.7 12948 23M 1,000,000+ Free 0 Everyone Casual;Brain Games May 24, 2018 2.0.3165 2.3 and up
2029 Dog Run - Pet Dog Simulator FAMILY 4.7 48615 24M 10,000,000+ Free 0 Everyone Simulation;Action & Adventure May 22, 2018 1.4.12 4.1 and up
2032 Puzzle Kids - Animals Shapes and Jigsaw Puzzles FAMILY 4.6 1109 52M 1,000,000+ Free 0 Everyone Educational;Brain Games July 18, 2018 1.0.6 4.1 and up
2040 No. Color - Color by Number, Number Coloring FAMILY 4.8 269194 6.9M 10,000,000+ Free 0 Everyone Entertainment;Brain Games August 3, 2018 Varies with device Varies with device
... ... ... ... ... ... ... ... ... ... ... ... ... ...
10691 Pin-fo FAMILY 4.6 19 1.6M 500+ Free 0 Everyone Entertainment August 15, 2016 3rd Release Aug 2016 2.2 and up
10801 Fr Ignacio Outreach FAMILY 4.9 52 19M 1,000+ Free 0 Everyone Education January 19, 2018 1.0 4.4 and up
10809 Castle Clash: RPG War and Strategy FR FAMILY 4.7 376223 24M 1,000,000+ Free 0 Everyone Strategy July 18, 2018 1.4.2 4.1 and up
10820 Fr. Daoud Lamei FAMILY 5.0 22 8.6M 1,000+ Free 0 Teen Education June 27, 2018 3.8.0 4.1 and up
10837 Fr. Mike Schmitz Audio Teachings FAMILY 5.0 4 3.6M 100+ Free 0 Everyone Education July 6, 2018 1.0 4.1 and up

314 rows × 13 columns

In [ ]: