APP Store评分案例

#调用基本包
import pandas as pd
#数据读取
app=pd.read_csv('w1_applestore.csv')
#数据的基本信息
app.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 7197 entries, 0 to 7196
Data columns (total 11 columns):
Unnamed: 0          7197 non-null int64
id                  7197 non-null int64
track_name          7197 non-null object
size_bytes          7197 non-null int64
price               7197 non-null float64
rating_count_tot    7197 non-null int64
user_rating         7197 non-null float64
prime_genre         7197 non-null object
sup_devices         7197 non-null int64
ipadSc_urls         7197 non-null int64
lang                7197 non-null int64
dtypes: float64(2), int64(7), object(2)
memory usage: 618.6+ KB
app.head()
Unnamed: 0idtrack_namesize_bytespricerating_count_totuser_ratingprime_genresup_devicesipadSc_urlslang
00281656475PAC-MAN Premium1007882243.99212924.0Games38510
11281796108Evernote - stay organized1585786880.001610654.0Productivity37523
22281940292WeatherBug - Local Weather, Radar, Maps, Alerts1005240320.001885833.5Weather3753
33282614216eBay: Best App to Buy, Sell, Save! Online Shop...1285120000.002622414.0Shopping3759
44282935706Bible927744000.009859204.5Reference37545
#发现了unname 0这个奇怪的变量,需要进行清理
app.drop('Unnamed: 0',axis=1,inplace=True)
#drop默认是对行,axis=1为列
#inplace表示直接替换掉原有数据
#同样可以用位置来举
#app.drop(app.columns[0],axis=1,inplace=True)
#对数据型变量的整体描述,只对数值型有效
app.describe()
#数据的集中度:平均数,众数,中位数
#离散度:方差,标准差,四分位数
idsize_bytespricerating_count_totuser_ratingsup_devicesipadSc_urlslang
count7.197000e+037.197000e+037197.0000007.197000e+037197.0000007197.0000007197.0000007197.000000
mean8.631310e+081.991345e+081.7262181.289291e+043.52695637.3618173.7071005.434903
std2.712368e+083.592069e+085.8330067.573941e+041.5179483.7377151.9860057.919593
min2.816565e+085.898240e+050.0000000.000000e+000.0000009.0000000.0000000.000000
25%6.000937e+084.692275e+070.0000002.800000e+013.50000037.0000003.0000001.000000
50%9.781482e+089.715302e+070.0000003.000000e+024.00000037.0000005.0000001.000000
75%1.082310e+091.819249e+081.9900002.793000e+034.50000038.0000005.0000008.000000
max1.188376e+094.025970e+09299.9900002.974676e+065.00000047.0000005.00000075.000000
# 考虑将sizebytes变成mb,新增数据
app['size_mb'] = app['size_bytes'] / (1024 * 1024.0)
app.size_mb.describe()
count    7197.000000
mean      189.909414
std       342.566408
min         0.562500
25%        44.749023
50%        92.652344
75%       173.497070
max      3839.463867
Name: size_mb, dtype: float64
# 根据价格新增标签
app['paid'] = app['price'].apply(lambda x: 1 if x > 0 else 0)
#lambda阐述规则,X为price,为paid赋值,即当price>0,paid为1,其他情况下,paid为0
app.paid.describe()
count    7197.000000
mean        0.436432
std         0.495977
min         0.000000
25%         0.000000
50%         0.000000
75%         1.000000
max         1.000000
Name: paid, dtype: float64
# 该部分小结,初步完成数据清洗
#清洗异常值(unamed)
#给分析造成难度的值(size-bytes)
#核心变量的创建(免费/收费)
#value_counts (price,prime_genre)
#value_Coutn只能对应series,不能对整个dataframe做操作
app.price.value_counts()
0.00      4056
0.99       728
2.99       683
1.99       621
4.99       394
3.99       277
6.99       166
9.99        81
5.99        52
7.99        33
14.99       21
19.99       13
8.99         9
24.99        8
13.99        6
11.99        6
29.99        6
12.99        5
15.99        4
59.99        3
17.99        3
22.99        2
23.99        2
20.99        2
27.99        2
16.99        2
49.99        2
39.99        2
74.99        1
18.99        1
34.99        1
99.99        1
299.99       1
47.99        1
21.99        1
249.99       1
Name: price, dtype: int64
#删除价格大于等于49.99的app
app=app[app['price']<=49.99]
#数据的快速分组
bins = [0,2,10,300]
labels = [  '<2', '<10','<300']
app['price_new']=pd.cut(app.price, bins, right=False, labels=labels)
app.groupby(['price_new'])['price'].describe()
countmeanstdmin25%50%75%max
price_new
<25405.00.3619810.6753180.000.000.000.001.99
<101695.04.5658111.8640342.992.993.994.999.99
<30090.020.2566678.24593911.9914.9917.9923.9949.99
# groupby的操作,不同类别app的价格分布
app.groupby(['prime_genre'])['price'].describe()
countmeanstdmin25%50%75%max
prime_genre
Book112.01.7905363.3422100.00.00.002.9927.99
Business56.04.1364297.1544030.00.02.994.9949.99
Catalogs10.00.7990002.5266600.00.00.000.007.99
Education449.02.5720042.6695390.00.02.992.9924.99
Entertainment535.00.8897011.4540220.00.00.001.999.99
Finance104.00.4211541.1089900.00.00.000.005.99
Food & Drink63.01.5523813.9721190.00.00.001.4927.99
Games3862.01.4329232.4866090.00.00.001.9929.99
Health & Fitness180.01.9164442.0523780.00.01.992.999.99
Lifestyle144.00.8854171.4784100.00.00.001.244.99
Medical23.08.77608710.7882690.00.03.9916.9934.99
Music138.04.8354358.9156670.00.00.994.9949.99
Navigation45.02.5500004.4875840.00.00.992.9920.99
News75.00.5177331.1277710.00.00.000.003.99
Photo & Video349.01.4732952.2807030.00.00.991.9922.99
Productivity177.03.7901134.9657770.00.01.994.9929.99
Reference64.04.8368758.2851000.00.01.994.9947.99
Shopping122.00.0163110.1801660.00.00.000.001.99
Social Networking167.00.3398801.1422100.00.00.000.009.99
Sports114.00.9530702.4190840.00.00.000.9919.99
Travel81.01.1203702.1837720.00.00.000.999.99
Utilities248.01.6476212.6285410.00.00.991.9924.99
Weather72.01.6054171.8313160.00.00.992.999.99
app.rating_count_tot.describe()
count    7.190000e+03
mean     1.290515e+04
std      7.577526e+04
min      0.000000e+00
25%      2.725000e+01
50%      3.005000e+02
75%      2.796750e+03
max      2.974676e+06
Name: rating_count_tot, dtype: float64
#对用户打分的分组
bins = [0,1000,5000,100000,5000000]
app['rating_new']=pd.cut(app.rating_count_tot, bins, right=False)
#用户打分和价格的关系
app.groupby(['rating_new'])['price'].describe()
---------------------------------------------------------------------------

NameError                                 Traceback (most recent call last)

<ipython-input-1-7db46c2c9387> in <module>()
      1 #用户打分和价格的关系
----> 2 app.groupby(['rating_new'])['price'].describe()


NameError: name 'app' is not defined

[外链图片转存失败(img-MmcB1nyr-1567848025818)(attachment:_auto_0)]


#可视化部分
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
#app评分关系
plt.figure(figsize=(30,20))#调整大小
sns.relplot(x="prime_genre", y="user_rating",kind='line',
              data=app) #折线图
![在这里插入图片描述](https://img-blog.csdnimg.cn/20190907172142895.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDgwMTM2NA==,size_16,color_FFFFFF,t_70)
app1=app[app['price']<=9.99]
#直方图,APP价格的分布
sns.distplot(app1['price'])
<matplotlib.axes._subplots.AxesSubplot at 0x197e7afd4e0>

[外链图片转存失败(img-Jkqtoe5D-1567848025819)(output_24_1.png)]

#业务问题2:收费app的价格分布是如何的?不同类别之间有关系吗?

#箱线图,不同类别APP价格
plt.figure(figsize=(10,8))#调整大小
sns.boxplot(x='price',y='prime_genre',data=app[app['paid']==1])

#业务解答:价格绝大部分都集中在9.99美元以内,个别类别(如医疗)等因专业性总体价格会高于其他类别
<matplotlib.axes._subplots.AxesSubplot at 0x197e7905320>

[外链图片转存失败(img-Rus1wMa9-1567848025819)(output_25_1.png)]

#只保留五个类别数据
top5= ['Games','Entertainment', 'Education', 'Photo & Video',
       'Utilities']
app5 = app[app.prime_genre.isin(top5)]
#箱线图,前五个类别的app价格

plt.figure(figsize=(10,8))#调整大小
sns.boxplot(x='price',y='prime_genre',data=app5[app['paid']==1])
C:\Anaconda3\lib\site-packages\ipykernel_launcher.py:4: UserWarning: Boolean Series key will be reindexed to match DataFrame index.
  after removing the cwd from sys.path.





<matplotlib.axes._subplots.AxesSubplot at 0x197e97f3518>

[外链图片转存失败(img-UfxBAMNM-1567848025819)(output_27_2.png)]

#散点图,价格和用户评分的分布
sns.scatterplot(x='price',y='user_rating',data=app)
<matplotlib.axes._subplots.AxesSubplot at 0x197e81ae710>

[外链图片转存失败(img-GpeoFmNH-1567848025819)(output_28_1.png)]

#只保留五个类别数据
top5= ['Games','Entertainment', 'Education', 'Photo & Video',
       'Utilities']
app5 = app[app.prime_genre.isin(top5)]
#柱状图,前5个类别app的用户评分均值
#同一类别,将免费和付费的评分进行对比
plt.figure(figsize=(10,8))
sns.barplot(x='prime_genre',y='user_rating',hue='paid',data=app5)
<matplotlib.axes._subplots.AxesSubplot at 0x197e7fece48>

[外链图片转存失败(img-GvNqLeCi-1567848025820)(output_30_1.png)]

#业务问题1 免费或收费APP集中在哪些类别
#第一步,将数据加总成每个类别有多少个app
#第二步,从高到低进行排列
#第三步,将数据进行可视化

#使用countplot--count是对数据加总,plot将数据进行可视化
#使用order对数据进行排序

plt.figure(figsize=(20,10))
sns.countplot(y='prime_genre',hue='paid',data=app,order=app['prime_genre'].value_counts().index)
plt.tick_params(labelsize=20)
#index是转列
#业务解答:都是高度集中在游戏类别

[外链图片转存失败(img-R7wv07IO-1567848025820)(output_31_0.png)]

#免费与收费的APP在不同评分区间的分布
bins=[0,0.1,2.5,4.5,5]
app['rating_level']=pd.cut(app.user_rating,bins,right=False)
app.groupby(['rating_level'])['user_rating'].describe()
countmeanstdmin25%50%75%max
rating_level
[0.0, 0.1)929.00.0000000.0000000.00.00.00.00.0
[0.1, 2.5)206.01.6504850.4002131.01.52.02.02.0
[2.5, 4.5)2903.03.6460560.4679872.53.54.04.04.0
[4.5, 5.0)2660.04.5000000.0000004.54.54.54.54.5
sns.countplot(x='paid',hue='rating_level',data=app)
<matplotlib.axes._subplots.AxesSubplot at 0x197e9577f28>

[外链图片转存失败(img-AKjMqnn5-1567848025820)(output_34_1.png)]

#业务问题3:APP的大小和用户评分之间有关系吗?
q4=['user_rating','price','size_mb']
app[q4].corr()
user_ratingpricesize_mb
user_rating1.0000000.0732370.066160
price0.0732371.0000000.314386
size_mb0.0661600.3143861.000000
#业务解答:大小价格都不和评分没有直接关系,但是价格和大小之间有正相关关系
sns.heatmap(app[q4].corr())
#热力图,展现变量之间两两之间关系的强弱
<matplotlib.axes._subplots.AxesSubplot at 0x197e95ce6d8>

[外链图片转存失败(img-gfcZseez-1567848025820)(output_38_1.png)]

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
App Store评分制度是指用户可以在App Store上对应用进行评分和评论的系统。用户可以根据自己的使用体验给应用打出1到5颗星的评分,并留下文字评论来表达他们对应用的看法。用户的评分和评论对开发者和其他用户都具有重要的参考价值,可以帮助其他用户选择合适的应用,并激励开发者改进和优化他们的应用。 开发者可以通过多种方式在应用中引导用户进行评分,例如弹出提示框或在应用内展示评分按钮等。根据中提到的方法,开发者可以在应用中直接跳转到App Store中的评分页面,方便用户进行评分。此外,开发者还可以在应用上线前进行测试和优化,以提高用户的满意度,进而提高应用的评分和口碑。开发者还应该注意遵守App Store的规定,例如不进行虚假评分或任何违反规定的行为,以免应用被拒绝或受到其他不利影响。根据中的引用,拷贝其他已经在App Store上的应用是被禁止的,因此开发者应该努力创新和设计独特的应用,以吸引用户的眼球和好评。 总结来说,App Store评分制度是一个重要的用户反馈和应用推广机制。开发者可以通过合适的方法引导用户进行评分,并在应用的开发和运营中不断优化以提高用户满意度和评分。用户的评分和评论对其他用户选择应用具有重要参考价值,同时也可以激励开发者改进和优化他们的应用。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [比iPhone8更重要的新App Store,给内容产品的未来指出明路](https://blog.csdn.net/pmcaff2008/article/details/78236847)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [iOS中在APP内加入AppStore评分功能的实现方法](https://download.csdn.net/download/weixin_38602098/12769697)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [AppStore审查指导](https://blog.csdn.net/WKFfantasy/article/details/50184761)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值