image_output_1.png
import pandas as pd

import plotly.graph_objs as go

import plotly.offline as py

df = pd.read_csv('../input/googleplaystore.csv')

df.isnull().sum()

df = df.dropna(axis=0)

df.drop_duplicates('App', inplace=True)

def pie_plot(cnt, colors, text):
    labels = list(cnt.index)
    values = list(cnt.values)
    
    trace = go.Pie(labels=labels, 
                   values=values, 
                   hoverinfo='value+percent', 
                   title=text, 
                   textinfo='label', 
                   hole=.4, 
                   textposition='inside', 
                   marker=dict(colors = colors,
                              ),
                  )
    return trace

types = df["Type"].value_counts()
trace = pie_plot(types, ['#09efef', '#b70333'], "Results")

py.iplot([trace], filename='Type')

content = df['Content Rating'].value_counts()
trace = pie_plot(content, ['yellow', 'cyan', 'purple', 'red'], 'Content')
py.iplot([trace], filename='Content')