In [6]:
import numpy as np
import pandas as pd
from sklearn.impute import SimpleImputer
In [7]:
df = pd.read_csv('googleplaystore.csv')
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 [8]:
df.head()
Out[8]:
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. Name the apps that are in ART_AND_DESIGN with rating more then 4.5 in descending order WRT Ratings?¶
In [9]:
df_pr = df[df['Category'] == 'ART_AND_DESIGN']
df_pr = df_pr[df_pr['Rating'] > 4.5]
df_pr.sort_values( by = 'Rating', ascending = True ).head()
Out[9]:
App | Category | Rating | Reviews | Size | Installs | Type | Price | Content Rating | Genres | Last Updated | Current Ver | Android Ver | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | Mandala Coloring Book | ART_AND_DESIGN | 4.6 | 4326 | 21M | 100,000+ | Free | 0 | Everyone | Art & Design | June 26, 2018 | 1.0.4 | 4.4 and up |
19 | ibis Paint X | ART_AND_DESIGN | 4.6 | 224399 | 31M | 10,000,000+ | Free | 0 | Everyone | Art & Design | July 30, 2018 | 5.5.4 | 4.1 and up |
46 | Install images with music to make video withou... | ART_AND_DESIGN | 4.6 | 1070 | 26M | 100,000+ | Free | 0 | Everyone | Art & Design | November 14, 2017 | 1.6 | 4.1 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 |
4764 | X Launcher Prime: With OS Style Theme & No Ads | ART_AND_DESIGN | 4.7 | 149 | 3.5M | 1,000+ | Paid | $1.99 | Everyone | Art & Design | July 30, 2018 | 1.2.2 | 4.1 and up |
Q2. Which category is having maximum average rating Descending order?¶
In [17]:
df.groupby('Category')['Rating'].mean().sort_values(ascending = False)
# .
Out[17]:
Category EDUCATION 4.387778 ART_AND_DESIGN 4.368438 EVENTS 4.363647 BOOKS_AND_REFERENCE 4.311537 PERSONALIZATION 4.306873 GAME 4.282506 PARENTING 4.282223 HEALTH_AND_FITNESS 4.266296 BEAUTY 4.260882 SHOPPING 4.254052 SOCIAL 4.248001 WEATHER 4.239675 SPORTS 4.218404 PRODUCTIVITY 4.208287 HOUSE_AND_HOME 4.196819 FAMILY 4.192490 PHOTOGRAPHY 4.192179 AUTO_AND_VEHICLES 4.190824 MEDICAL 4.190167 LIBRARIES_AND_DEMO 4.182938 FOOD_AND_DRINK 4.170709 COMMUNICATION 4.163842 COMICS 4.156445 BUSINESS 4.145987 NEWS_AND_MAGAZINES 4.142993 FINANCE 4.139108 ENTERTAINMENT 4.126174 TRAVEL_AND_LOCAL 4.119716 LIFESTYLE 4.112427 VIDEO_PLAYERS 4.074858 TOOLS 4.065970 MAPS_AND_NAVIGATION 4.065061 DATING 4.007864 Name: Rating, dtype: float64
Q3. How many paid apps are there in each category in Descending Order?¶
In [19]:
df_pr = df[df['Type'] == 'Paid']
df_pr.groupby('Category').count()['Type'].sort_values(ascending = False)
# df.values
Out[19]:
Category FAMILY 190 MEDICAL 109 GAME 83 PERSONALIZATION 82 TOOLS 77 BOOKS_AND_REFERENCE 28 PRODUCTIVITY 28 COMMUNICATION 27 SPORTS 24 PHOTOGRAPHY 22 LIFESTYLE 19 FINANCE 17 HEALTH_AND_FITNESS 16 BUSINESS 14 TRAVEL_AND_LOCAL 12 WEATHER 8 DATING 7 MAPS_AND_NAVIGATION 5 EDUCATION 4 VIDEO_PLAYERS 4 AUTO_AND_VEHICLES 3 SOCIAL 3 ART_AND_DESIGN 3 NEWS_AND_MAGAZINES 2 PARENTING 2 FOOD_AND_DRINK 2 SHOPPING 2 ENTERTAINMENT 2 LIBRARIES_AND_DEMO 1 EVENTS 1 Name: Type, dtype: int64
In [22]:
df.iat[0,0]
Out[22]:
'Photo Editor & Candy Camera & Grid & ScrapBook'
In [ ]: