【知识跨境电商API接口丨python数分实战】国际电商平台用户成交转化分析
今天这篇文章将给大家介绍国际电商平台用户成交转化分析案例。
01
初步思路
问题已经明确
GMV的下降,可能出在用户下单成交环节。
这里需要明确GMV下降是今年与去年相比吗?明确GMV下降到底如何判断出来的?对比的对象是什么?如果是去年,就找到了标杆。
需要解决的问题
1、验证GMV的下降,是用户下单环节所引起的。
2、下单环节的用户特征。
主要分析步骤或思路
步骤一:分别绘制新老用户的用户漏斗,比较各个环节的转化率—用户在以下各环节的占比情况。(这里“是否是全新用户” 新老用户分开进行过对比分析)
分析目的:发现XX用户到底在XX页面出现问题。
需要找到标杆,使用“对比法”与“去年”相比,用户占比下降严重(最大)的环节,即为优先需要考虑的地方。
举例:
浏览首页的用户数: 100人。
浏览商品页的用户数: 80人。
加入购物车的用户数: 50人。
下单付款的用户数: 20人。
那么各个环节的转化率计算如下:
浏览商品页转化率 = 浏览商品页用户数/浏览首页用户数 = 80/100 = 80%。
加入购物车转化率 = 加入购物车用户数/浏览商品页用户数 = 50/80 = 62.5%。
下单付款转化率 = 下单付款用户数/加入购物车用户数 = 20/50 = 40%。
通过计算每个环节的转化率,我们可以判断用户在从加入购物车到下单付款这个环节出现了较大的流失。
此外,我们还可以计算总体转化率:
下单付款用户数/浏览首页用户数 = 20/100 = 20%。
总体转化率也可以反映出整个流程的效率。
可能出现的结果:
1、新老用户都在XX环节占比严重下降。
2、新用户在A环节占比严重下降;老用户在B环节占比严重下降。
3、新用户在A环节占比严重下降;老用户并未发生严重下降。
4、老用户在A环节占比严重下降;新用户并未发生严重下降。
5、新老用户在什么页面都未停留的占比较大。
步骤二:异常环节用户特征分析。
优先考虑用户来源。
原因:渠道是企业获客的主要途径,需要花费成本去宣传,如果能够确定是某个渠道的获取的客户问题,进一步从根本上减少公司成本。
可能出现的结果:
1、XX主要聚集在XX来源。
2、XX在各来源占比基本差不多,可以基本确定可能不是渠道的问题。
步骤三:进一步分析第二部分人群的性别、国家、年龄、使用系统、设备等因素的影响,把人群确定下去。
可能的结果:
1、针对步骤二的1确定了某一个渠道的某一类人群出现的问题,针对这部分人群提出建议和措施。
2、针对步骤二的1确定了某一个渠道人物画像之间并未有明显的差异,可能就是该渠道获客不好,提出建议是否公司可以减少在该渠道的投入。
3、针对步骤二的2聚类出某一类人群,是否该人群对我们公司的产品不感兴趣或者这部分人群在支付过程中遇到什么问题。
例如:结合公司产品定位,结合这些人群过往购买记录等数据更加深入的了解这部分人群的喜好(这个针对老客户)。针对新客户,可通过电话调研了解一些基本情况。
关键结论
结论 1:
两年全量客户procudt_page--pay_page的转化率最低,仅为13%。
"procudt_page--pay_page"环节中流失的用户特征:US/Femal/[[30, 40) 年龄段,占流失用户的14.06%。
结论 2:
今年,新用户在''payment_page--confirmation_page''环节的转化率为22%,相比去年新客户的转化率降幅14%。
来自 "Direct"渠道的新用户在"payment_page-confirmation_page"环节中的流失商户占比增幅8%(去年的74%,今年的"82%)。
结论 3:
在confirmation_page流失的用户群体中,44%人群的经历"home--listing--product"环节,但仅5%人群经历"home--listing--product--pay" 。
说明未确认支付的用户超过50%对产品并不感兴趣,但5%的用户有潜在购买意愿。
建议方案
1、整体上,无论去年还是今年,在procudt_page--pay_page的转化率较低,仅为13%,与行业平均水平的20%还存在一定的差距。
结合外部调研数据,分析产品本身是否受欢迎,能否满足平台定位的人群需求,同时,结合平台产品的性价比和价格带情况,分析平台产品现状,分析与竟对优劣势。
首先针对在"procudt_page--pay_page"环节中流失用户进行调研,建议先对US/Femal/[30,40)这部分人群在平台投放问卷或者电话访谈的形式,询问浏览产品后为什么没有下单意愿?
调研问题可从:商城产品的满足度、产品属性美观度或详细性、完整性、产品价格、还会使用其他哪些平台、在平台选择中首先考虑哪些因素等方面着手。为后续提高平台整体的转化率做铺垫。
2、相比去年,今年新用户在"payment_page--confirmation_page"新用户的转化率是22%,相比去年新客户的36%,转化率下降 。
主要是由于今年来源于"Direct"渠道的流失用户占比增加,针对今年该渠道的新用户,结合用户价值画像,分析该渠道获客质量占比是否合理,是否存在无意愿客户,相关业务部门沟通,相比去年,今年"Direct"渠道是否有所改动。
3、在confirmation_page流失用户群体中,有44%的用户到达了product_page ,5%的用户群体经历了"home--listing--product-pay"。
而该部分路径的用户,显示出对产品的需求,但是比较谨慎,可通过查看这部分群体的在支付页面退出后的路径去向和页面停留时间,分析用户未支付的原因,同时设置二次提醒,提醒用户支付商品。
针对直接退出APP的用户,可在后台设置提醒服务,提醒用户对产品进行支付。
针对退出支付页,又回到产品页的商户,可针对推荐与未支付功能或价格相符的产品,再次刺激用户消费。
数据明细
from pyecharts import options as opts
from pyecharts.charts import Funnel
import openpyxl
import pandas as pd
import numpy as np
02
数据清洗&查看
数据下载:关注公众号,回复关键字【数据集】获取。
# 你的代码
# 注意补充完备的注释
# 1、数据清洗/整合
def handle_table(user_table, right_table, col_name):
user_table = pd.merge(user_table, right_table, how='left', on='user_id')
user_table['page'] = user_table['page'].fillna(0).replace(col_name, 1)
user_table = user_table.rename(columns={'page': col_name})
return user_table
user_table = pd.read_csv(r'/home/mw/input/data4688/user_table.csv')
home_page_table = pd.read_csv(r'/home/mw/input/data4688/home_page_table.csv')
listing_page_table = pd.read_csv(
r'/home/mw/input/data4688/listing_page_table.csv')
product_page_table = pd.read_csv(
r'/home/mw/input/data4688/product_page_table.csv')
payment_page_table = pd.read_csv(
r'/home/mw/input/data4688/payment_page_table.csv')
payment_confirmation_table = pd.read_csv(
r'/home/mw/input/data4688/payment_confirmation_table.csv')
user_table = handle_table(user_table, home_page_table, 'home_page')
user_table = handle_table(user_table, listing_page_table, 'listing_page')
user_table = handle_table(user_table, product_page_table, 'product_page')
user_table = handle_table(user_table, payment_page_table, 'payment_page')
user_table = handle_table(
user_table,
payment_confirmation_table,
'payment_confirmation_page')
user_table = user_table[user_table.age <= 70]
del user_table['user_id']
last_year_user_data = pd.read_excel(r'/home/mw/input/data4688/last_year_user_data.xlsx')
del last_year_user_data['user_id']
last_year_user_data=last_year_user_data.rename(columns={'confirmation_page':'payment_confirmation_page'})
last_year_user_data['new_user'].count()
输出结果:
59415
03
数据汇总
# 今年网页访问情况
#user_table['辅助']=1
user_table_1=user_table.groupby('new_user').sum()
#del user_table_1['new_user']
del user_table_1['age']
del user_table_1['total_pages_visited']
#del user_table_1['辅助']
user_table_1
# 去年网页访问情况
#last_year_user_data['辅助']=1
last_year_user_data_1=last_year_user_data.groupby('new_user').sum()
#del last_year_user_data_1['new_user']
del last_year_user_data_1['age']
del last_year_user_data_1['total_pages_visited']
#del last_year_user_data_1['辅助']
last_year_user_data_1
输出结果:
两年用户行为路径分析(路径转化率)
#今年新老客户转化率情况
columns_this_year = user_table_1.columns
# 遍历列名列表,进行连续的列除法操作,并创建新的列
for i in range(1, len(columns_this_year)):
col_name = columns_this_year[i-1]+"--"+columns_this_year[i] # 新列的名称,如 result_2_1、result_3_2 等
user_table_1[col_name] = (user_table_1[columns_this_year[i]] / user_table_1[columns_this_year[i-1]]*100).round(0).map('{}%'.format)
#去年新老客户转化率情况
columns_last_year=last_year_user_data_1.columns
# 遍历列名列表,进行连续的列除法操作,并创建新的列
for i in range(1, len(columns_last_year)):
col_name = columns_last_year[i-1]+"--"+columns_last_year[i] # 新列的名称,如 result_2_1、result_3_2 等
last_year_user_data_1[col_name] = (last_year_user_data_1[columns_last_year[i]] / last_year_user_data_1[columns_last_year[i-1]]*100).round(0).map('{}%'.format)
# 打印处理后的 DataFrame
user_table_1
pd.concat(
[user_table_1.iloc[:,5:],last_year_user_data_1.iloc[:,5:]],
keys=['今年转化率', '去年转化率'])
输出结果:
小结:
1、两年用户由产品品详情页—浏览付款页的转化率最低,均为13%。
2、在浏览过"payment_page--confirmation_page"环节中,去年新老客户转化率均为36%,但今年新客户的转化率较低,仅为22%,下降幅度达14%。
last_year_user_data=last_year_user_data.rename(columns={'confirmation_page':'payment_confirmation_page'})
## 1、今年和去年数据合并
user_table['年份']=2023
last_year_user_data['年份']=2022
last_now_data= user_table.append(last_year_user_data, ignore_index = False)
# 年龄段打标签
bins=[0,22,30,40,50,123]
# 按分段离散化数据
segments=pd.cut(last_now_data['age'],bins,right=False)
last_now_data['年龄段']=segments
# 统计各分段人数
counts=pd.value_counts(segments,sort=False)
两年全量客户"procudt_page--pay_page"环节流失用户特征
###在产品页面的人
all_users=last_now_data.loc[(last_now_data['product_page'] == 1) ]
### 浏览过产品页但未浏览过支付页的流失用户
liushi_users=last_now_data.loc[(last_now_data['product_page'] == 1) & (last_now_data['payment_page']==0)]
#### 4.5 操作系统+性别
liushi_sourece=liushi_users[['new_user','country','sex','年龄段']]
#user_table_sourece = sourece.groupby('source').count().reset_index()
liushi_table_sourece = liushi_sourece.groupby(['country','sex','年龄段']).count().reset_index()
liushi_table_sourece['占比'] = (100*liushi_table_sourece['new_user']/liushi_table_sourece['new_user'].sum()).round(2).map('{}%'.format)
liushi_table_sourece
输出结果:
小结:
1、流失用户中US国家的用户占比最高为60.22%。
2、流失用户中Femal用户占比最高为61%。
3、流失用户中Femal用户占年龄主要聚集在22-40之间,用户占比达36%。
4、主要流失用户画像为US\Femal[30, 40)年龄段,占比达14.06%。
payment_page--payment_confirmation_page流失用户的主要来源渠道
pay=user_table.loc[ (user_table['new_user']==0)& (user_table['payment_page']==1)]
pay=pay[['new_user', 'source']]
pay1 = pay.groupby(['source']).count().reset_index()
pay1=pay1.rename(columns={'new_user': '老用户支付页人数'})
now_liushi_sourece=user_table.loc[(user_table['home_page'] == 1)& (user_table['payment_page']==1)
& (user_table['payment_confirmation_page']==0)& (user_table['new_user']==0)]
now_liushi_sourece=now_liushi_sourece[['new_user', 'source']]
now_liushi_sourece = now_liushi_sourece.groupby(['source']).count().reset_index()
now_liushi_sourece = now_liushi_sourece.rename(columns={'new_user': '老用户支付页点击但确认页未点击人数'})
now_liushi_old=pd.concat([pay1,now_liushi_sourece], axis=1)
now_liushi_old['占比']=(100*now_liushi_old['老用户支付页点击但确认页未点击人数']/now_liushi_old['老用户支付页人数']).round(0).map('{}%'.format)
pay=last_year_user_data.loc[ (last_year_user_data['new_user']==0)& (last_year_user_data['payment_page']==1)]
pay=pay[['new_user', 'source']]
pay1 = pay.groupby(['source']).count().reset_index()
pay1=pay1.rename(columns={'new_user': '老用户支付页人数'})
now_liushi_sourece=last_year_user_data.loc[(last_year_user_data['home_page'] == 1)& (last_year_user_data['payment_page']==1)
& (last_year_user_data['payment_confirmation_page']==0)& (last_year_user_data['new_user']==0)]
now_liushi_sourece=now_liushi_sourece[['new_user', 'source']]
now_liushi_sourece = now_liushi_sourece.groupby(['source']).count().reset_index()
now_liushi_sourece = now_liushi_sourece.rename(columns={'new_user': '老用户支付页点击但确认页未点击人数'})
last_liushi_old=pd.concat([pay1,now_liushi_sourece], axis=1)
last_liushi_old['占比']=(100*last_liushi_old['老用户支付页点击但确认页未点击人数']/last_liushi_old['老用户支付页人数']).round(0).map('{}%'.format)
pay=user_table.loc[ (user_table['new_user']==1)& (user_table['payment_page']==1)]
pay=pay[['new_user', 'source']]
pay1 = pay.groupby(['source']).count().reset_index()
pay1=pay1.rename(columns={'new_user': '新用户支付页人数'})
now_liushi_sourece=user_table.loc[(user_table['home_page'] == 1)& (user_table['payment_page']==1)
& (user_table['payment_confirmation_page']==0)& (user_table['new_user']==1)]
now_liushi_sourece=now_liushi_sourece[['new_user', 'source']]
now_liushi_sourece = now_liushi_sourece.groupby(['source']).count().reset_index()
now_liushi_sourece = now_liushi_sourece.rename(columns={'new_user': '新用户支付页点击但确认页未点击人数'})
now_liushi=pd.concat([pay1,now_liushi_sourece], axis=1)
now_liushi['占比']=(100*now_liushi['新用户支付页点击但确认页未点击人数']/now_liushi['新用户支付页人数']).round(0).map('{}%'.format)
now_liushi
pay=last_year_user_data.loc[ (last_year_user_data['new_user']==1)& (last_year_user_data['payment_page']==1)]
pay=pay[['new_user', 'source']]
pay1 = pay.groupby(['source']).count().reset_index()
pay1=pay1.rename(columns={'new_user': '新用户支付页人数'})
now_liushi_sourece=last_year_user_data.loc[(last_year_user_data['home_page'] == 1)& (last_year_user_data['payment_page']==1)
& (last_year_user_data['payment_confirmation_page']==0)& (last_year_user_data['new_user']==1)]
now_liushi_sourece=now_liushi_sourece[['new_user', 'source']]
now_liushi_sourece = now_liushi_sourece.groupby(['source']).count().reset_index()
now_liushi_sourece = now_liushi_sourece.rename(columns={'new_user': '新用户支付页点击但确认页未点击人数'})
last_liushi=pd.concat([pay1,now_liushi_sourece], axis=1)
last_liushi['占比']=(100*last_liushi['新用户支付页点击但确认页未点击人数']/last_liushi['新用户支付页人数']).round(0).map('{}%'.format)
pd.concat([now_liushi_old[['source','占比']],last_liushi_old[['source','占比']]
,now_liushi[['source','占比']],last_liushi[['source','占比']]
],keys=['今年老用户支付-确认支付页流失占比', '去年老用户支付-确认支付页流失占比','今年新用户支付-确认支付页流失占比', '去年新用户支付-确认支付页流失占比'])
输出结果:
小结:
1、 在"payment_page--confirmation_page"环节流失的老用户中,今年3个渠道的用户占比分别为73%、60%和79%,相比去年,用户占比均有不同程度的下降。
2、在"payment_page--confirmation_page"环节流失的新商户中,"Ads "和"Seo "2个渠道的流失用户占比,相比去年分别降幅4%和2%。
但"Direct"渠道的流失商户占比增高,去年的74.39%提高到今年的"81.9%"。
“confirmation_page”流失用户的行为路径分析
在confirmation_page流失的用户
confirmation_page_liushi_users=last_now_data.loc[(last_now_data['payment_confirmation_page'] ==0)& (last_now_data['年份']==2023 )]
confirmation_page_liushi_users.groupby(['new_user','年份']).count()
##新用户的行为路径
输出结果:
在confirmation_page流失的老用户的行为路径
#流失用户路径.home_page----payment_confirmation_page
data1=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==0)]
##home_page----listing_page--payment_confirmation_page
data2=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==0)] #2022年
###home_page----product_page--payment_confirmation_page
data3=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==0)] #无
###home_page----payment_page--payment_confirmation_page
data4=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==0)] #无
###home_page----listing_page--product_page--payment_confirmation_page
data5=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==0)] #2022
###home_page----listing_page--payment_page--payment_confirmation_page
data6=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==0)] #无
###home_page----product_page--payment_page--payment_confirmation_page
data7=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==0)] #无
###home_page----listing_page--product_page--payment_page--payment_confirmation_page
data8=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==0)] #2年均有
#data_old_liu=[data1.shape[0],data2.shape[0],data3.shape[0],data4.shape[0],data5.shape[0],data6.shape[0],data7.shape[0],data8.shape[0]]
data_old_liu=pd.DataFrame({'home':[data1.shape[0]],'home---listing':[data2.shape[0]],'home--product':[data3.shape[0]]
,'home---payment':[data4.shape[0]],'home--listing--product':[data5.shape[0]],'home--listing--payment':[data6.shape[0]]
,'home--product--payment':[data7.shape[0]],'home--listing--product--payment':[data8.shape[0]],
})
data_old_liu
输出结果:
确认流失的新用户的行为路径
确认支付的用户基本
#流失用户路径.home_page----payment_confirmation_page
data1=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==1)]
##home_page----listing_page--payment_confirmation_page
data2=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==1)] #2022年
###home_page----product_page--payment_confirmation_page
data3=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==1)] #无
###home_page----payment_page--payment_confirmation_page
data4=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==1)] #无
###home_page----listing_page--product_page--payment_confirmation_page
data5=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==1)] #2022
###home_page----listing_page--payment_page--payment_confirmation_page
data6=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==1)] #无
###home_page----product_page--payment_page--payment_confirmation_page
data7=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==1)] #无
###home_page----listing_page--product_page--payment_page--payment_confirmation_page
data8=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==1)] #2年均有
#data_old_liu=[data1.shape[0],data2.shape[0],data3.shape[0],data4.shape[0],data5.shape[0],data6.shape[0],data7.shape[0],data8.shape[0]]
data_new_liu=pd.DataFrame({'home':[data1.shape[0]],'home---listing':[data2.shape[0]],'home--product':[data3.shape[0]]
,'home---payment':[data4.shape[0]],'home--listing--product':[data5.shape[0]],'home--listing--payment':[data6.shape[0]]
,'home--product--payment':[data7.shape[0]],'home--listing--product--payment':[data8.shape[0]],
})
data_new_liu
输出结果:
confirmation_page_liushi_users=last_now_data.loc[(last_now_data['payment_confirmation_page'] ==0)& (last_now_data['年份']==2022 )]
confirmation_page_liushi_users.groupby(['new_user','年份']).count()
#流失用户路径.home_page----payment_confirmation_page
data1=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==0)]
##home_page----listing_page--payment_confirmation_page
data2=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==0)] #2022年
###home_page----product_page--payment_confirmation_page
data3=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==0)] #无
###home_page----payment_page--payment_confirmation_page
data4=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==0)] #无
###home_page----listing_page--product_page--payment_confirmation_page
data5=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==0)] #2022
###home_page----listing_page--payment_page--payment_confirmation_page
data6=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==0)] #无
###home_page----product_page--payment_page--payment_confirmation_page
data7=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==0)] #无
###home_page----listing_page--product_page--payment_page--payment_confirmation_page
data8=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==0)] #2年均有
data_old_liu_2022=pd.DataFrame({'home':[data1.shape[0]],'home---listing':[data2.shape[0]],'home--product':[data3.shape[0]]
,'home---payment':[data4.shape[0]],'home--listing--product':[data5.shape[0]],'home--listing--payment':[data6.shape[0]]
,'home--product--payment':[data7.shape[0]],'home--listing--product--payment':[data8.shape[0]],
})
#流失用户路径.home_page----payment_confirmation_page
data1=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==1)]
##home_page----listing_page--payment_confirmation_page
data2=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==1)] #2022年
###home_page----product_page--payment_confirmation_page
data3=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==1)] #无
###home_page----payment_page--payment_confirmation_page
data4=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==1)] #无
###home_page----listing_page--product_page--payment_confirmation_page
data5=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==0)&(confirmation_page_liushi_users['new_user'] ==1)] #2022
###home_page----listing_page--payment_page--payment_confirmation_page
data6=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==0)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==1)] #无
###home_page----product_page--payment_page--payment_confirmation_page
data7=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==0)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==1)] #无
###home_page----listing_page--product_page--payment_page--payment_confirmation_page
data8=confirmation_page_liushi_users.loc[(confirmation_page_liushi_users['home_page'] == 1)& (confirmation_page_liushi_users['listing_page']==1)
& (confirmation_page_liushi_users['product_page']==1)
& (confirmation_page_liushi_users['payment_page']==1)&(confirmation_page_liushi_users['new_user'] ==1)] #2年均有
#data_old_liu=[data1.shape[0],data2.shape[0],data3.shape[0],data4.shape[0],data5.shape[0],data6.shape[0],data7.shape[0],data8.shape[0]]
data_new_liu_2022=pd.DataFrame({'home':[data1.shape[0]],'home---listing':[data2.shape[0]],'home--product':[data3.shape[0]]
,'home---payment':[data4.shape[0]],'home--listing--product':[data5.shape[0]],'home--listing--payment':[data6.shape[0]]
,'home--product--payment':[data7.shape[0]],'home--listing--product--payment':[data8.shape[0]],
})
liushi=pd.concat([data_old_liu_2022, data_new_liu_2022,data_old_liu, data_new_liu],ignore_index=True)
liushi.index = ['old_user_2022', 'new_user_2022','old_user_2023', 'new_user_2023']
###计算列数据之和。
liushi["求和"]=liushi.apply(lambda x:sum(x),axis=1)
liushi
输出结果:
columns_last_year = liushi.columns
liushi_rate = pd.DataFrame()
# 遍历列名列表,进行连续的列除法操作,并创建新的列
for i in range(0, len(columns_last_year)-1):
col_name = columns_last_year[i] # 新列的名称,如 result_2_1、result_3_2 等
liushi_rate[col_name] = (liushi[columns_last_year[i]] / liushi["求和"]*100).round(0).map('{}%'.format)
liushi_rate
输出结果:
小结:
流失用户中,大部分人的行为路径为home--listing--product,占总人数的44%。
但是home--listing--product--payment的用过开始极具下降仅为5%,该部分路径的用户,显示出对产品的需求,但是比较谨慎。
相关文章:

【知识跨境电商API接口丨python数分实战】国际电商平台用户成交转化分析
今天这篇文章将给大家介绍国际电商平台用户成交转化分析案例。 01 初步思路 问题已经明确 GMV的下降,可能出在用户下单成交环节。 这里需要明确GMV下降是今年与去年相比吗?明确GMV下降到底如何判断出来的?对比的对象是什么?如…...
【SpringBoot】Java对象级联校验
对于Javabean对象中的普通属性字段,我们可以直接使用注解进行数据校验,那如果是关联对象呢?其实也很简单,在属性上添加Valid就可以作为属性对象的内部属性进行验证。 public class User{ Size(min3,max5,message"list的Size在…...

【Redis 进阶】哨兵 Sentinel(重点理解流程和原理)
Redis 的主从复制模式下,一旦主节点由于故障不能提供服务,需要人工进行主从切换,同时大量的客户端需要被通知切换到新的主节点上,对于上了一定规模的应用来说,这种方案是无法接受的,于是 Redis 从 2.8 开始…...

CSS实现元素hover时背景色拉伸渐变
HTML代码 <ul><li><p><a href"#">Facebook搜索</a></p></li><li><p><a href"#">Instagram搜索</a></p></li><li><p><a href"#">Google搜索&…...
Activity收不到bundle值
Activity有四种启动模式,一般为默认。 当Activity的启动模式为singleTask或singleInstance的时候,通过Intent传值,getIntent是接收不到值的,为null。 当Activity的启动模式为singletop的时候,若Activity位于栈顶&…...

ZBrush
所有建模软件最开始需要搞清楚的就是基础操作,如旋转视角,放大缩小,移动等,一般可以看上手教程 zbrush中雕刻很重要的概念是笔刷:ZBrush笔刷介绍-CSDN博客 基本操作 编辑模式:T 清除画布:ctr…...

【多线程-从零开始-贰】线程的构造方法和常见属性
Thread 的常见构造方法 在创建线程的时候,是可以给线程起名字的。默认为 Thread-0 、Thread-1… 不会影响线程执行效果,可以更好地进行管理 ThreadGroup -线程组 把多个线程放到一组里,方便统一的设置线程的一些属性不过现在很少用到&#…...

力扣:100379. 新增道路查询后的最短距离 I(Java,BFS)
目录 题目描述:示例 :代码实现: 题目描述: 给你一个整数 n 和一个二维整数数组 queries。 有 n 个城市,编号从 0 到 n - 1。初始时,每个城市 i 都有一条单向道路通往城市 i 1( 0 < i < …...
程序开发的常用设计思想
程序开发的设计思想多种多样,每种思想都旨在提高软件的可读性、可维护性、可扩展性和性能。以下是一些常见的程序开发设计思想: 1. 面向对象编程(Object-Oriented Programming, OOP) 核心思想: 将程序视为对象的集合…...

Qt之Gui
组件依赖关系 应用 #mermaid-svg-GADicZtZJRVVUeiF {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-GADicZtZJRVVUeiF .error-icon{fill:#552222;}#mermaid-svg-GADicZtZJRVVUeiF .error-text{fill:#552222;stroke:#…...

Linux操作系统之进程信号
进程信号 一、信号1、概念2、系统定义的信号列表3、常见的信号处理方式 二、产生信号的方式1、终端按键(1)组合键(2)示例代码(3)运行结果 2、调用系统函数(1)kill命令(2&…...

科普文:微服务之Spring Cloud Alibaba消息队列组件RocketMQ工作原理
概叙 本文探讨 RocketMQ 的事务消息原理,并从源码角度进行分析,以及事务消息适合什么场景,使用事务消息需要注意哪些事项。 同时详细介绍RocketMQ 事务消息的基本流程,并通过源码分析揭示了其内部实现原理,尽管事务消…...

黑马头条vue2.0项目实战(五)——首页—频道编辑
目录 1. 使用页面弹出层 1.1 页面弹出层简单使用 1.2 创建频道编辑组件 1.3 页面布局 2. 展示我的频道 3. 展示推荐频道列表 3.1 获取所有频道 3.2 处理展示推荐频道 4. 添加频道 5. 编辑频道 5.1 处理编辑状态 5.2 切换频道 5.3 让激活频道高亮 5.4 删除频道 6.…...
Java:基础语法
基础语法 1. 基本结构类和方法 2. 变量和数据类型基本数据类型引用数据类型 3. 操作符算术操作符比较操作符逻辑操作符 4. 控制结构条件语句循环语句 5. 数组6. 方法7. 面向对象编程类和对象继承多态 8. 异常处理9. 常用类库 1. 基本结构 类和方法 Java程序的基本单位是类&am…...
安装bedtools详细步骤和详细介绍bedtools用法
安装bedtools详细步骤和详细介绍bedtools用法 一、安装bedtools详细步骤下载解压安装编译依赖编译设置环境变量激活环境变量执行命令查看版本二、详细介绍bedtools用法使用bedtools示例用法bedtools intersectbedtools bamtobedbedtools window一、安装bedtools详细步骤 下载 …...

21 - grace数据处理 - 补充 - 泄露误差改正 - Slepian局部谱分析法(一) - slepian分析法理论理解
21 - grace数据处理 - 泄露误差改正 - Slepian局部谱分析法 - slepian分析法理论理解 0 引言1 slepian谱分析法1.1 slepian谱分析法AI解释1.2 基于slepian谱分析法的GRACE数据处理应用2 slepian谱分析法关键过程实现2.1 求解正定特征方程2.2 计算slepian基函数2.3 计算Shannon数…...

WLAN国家码与信道顺从表
国家码和信道顺从表及信道功率限制 不同的国家和地区规定了在本国或本地区可以使用的信道、射频信号在信道中的最大发射功率。工作在不同信道的射频信号,信号强度可能会有差别。国家码和信道顺从表、各信道的功率限制值、信道编号和频率对照关系请参见国家码和信道…...

行为型设计模式1:状态/策略/命令
行为型设计模式:状态/策略/命令 (qq.com)...

【知识专栏丨python数分实战】天猫订单数据分析及可视化|taobao天猫订单接口
今天这篇文章将给大家介绍天猫订单数据分析及可视化案例。 import pandas as pdimport numpy as npfrom pyecharts.charts import Pie,Bar,Line,Map,Map3D,Funnelfrom pyecharts import options as optsimport matplotlib.pyplot as pltimport warningsimport seaborn as snsfr…...
[kimi笔记]为什么csc.exe不可以双击运行
csc.exe 是 C# 编译器的可执行文件,它是 .NET Framework 的一部分,用于编译 C# 源代码文件( .cs 文件)生成可执行文件( .exe 文件)或其他类型的程序集。 csc.exe 不能通过双击运行的原因有以下几点&…...

【Python】 -- 趣味代码 - 小恐龙游戏
文章目录 文章目录 00 小恐龙游戏程序设计框架代码结构和功能游戏流程总结01 小恐龙游戏程序设计02 百度网盘地址00 小恐龙游戏程序设计框架 这段代码是一个基于 Pygame 的简易跑酷游戏的完整实现,玩家控制一个角色(龙)躲避障碍物(仙人掌和乌鸦)。以下是代码的详细介绍:…...

Lombok 的 @Data 注解失效,未生成 getter/setter 方法引发的HTTP 406 错误
HTTP 状态码 406 (Not Acceptable) 和 500 (Internal Server Error) 是两类完全不同的错误,它们的含义、原因和解决方法都有显著区别。以下是详细对比: 1. HTTP 406 (Not Acceptable) 含义: 客户端请求的内容类型与服务器支持的内容类型不匹…...
电脑插入多块移动硬盘后经常出现卡顿和蓝屏
当电脑在插入多块移动硬盘后频繁出现卡顿和蓝屏问题时,可能涉及硬件资源冲突、驱动兼容性、供电不足或系统设置等多方面原因。以下是逐步排查和解决方案: 1. 检查电源供电问题 问题原因:多块移动硬盘同时运行可能导致USB接口供电不足&#x…...

基于当前项目通过npm包形式暴露公共组件
1.package.sjon文件配置 其中xh-flowable就是暴露出去的npm包名 2.创建tpyes文件夹,并新增内容 3.创建package文件夹...

Spring数据访问模块设计
前面我们已经完成了IoC和web模块的设计,聪明的码友立马就知道了,该到数据访问模块了,要不就这俩玩个6啊,查库势在必行,至此,它来了。 一、核心设计理念 1、痛点在哪 应用离不开数据(数据库、No…...
精益数据分析(97/126):邮件营销与用户参与度的关键指标优化指南
精益数据分析(97/126):邮件营销与用户参与度的关键指标优化指南 在数字化营销时代,邮件列表效度、用户参与度和网站性能等指标往往决定着创业公司的增长成败。今天,我们将深入解析邮件打开率、网站可用性、页面参与时…...
鸿蒙DevEco Studio HarmonyOS 5跑酷小游戏实现指南
1. 项目概述 本跑酷小游戏基于鸿蒙HarmonyOS 5开发,使用DevEco Studio作为开发工具,采用Java语言实现,包含角色控制、障碍物生成和分数计算系统。 2. 项目结构 /src/main/java/com/example/runner/├── MainAbilitySlice.java // 主界…...

九天毕昇深度学习平台 | 如何安装库?
pip install 库名 -i https://pypi.tuna.tsinghua.edu.cn/simple --user 举个例子: 报错 ModuleNotFoundError: No module named torch 那么我需要安装 torch pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple --user pip install 库名&#x…...

技术栈RabbitMq的介绍和使用
目录 1. 什么是消息队列?2. 消息队列的优点3. RabbitMQ 消息队列概述4. RabbitMQ 安装5. Exchange 四种类型5.1 direct 精准匹配5.2 fanout 广播5.3 topic 正则匹配 6. RabbitMQ 队列模式6.1 简单队列模式6.2 工作队列模式6.3 发布/订阅模式6.4 路由模式6.5 主题模式…...
【Nginx】使用 Nginx+Lua 实现基于 IP 的访问频率限制
使用 NginxLua 实现基于 IP 的访问频率限制 在高并发场景下,限制某个 IP 的访问频率是非常重要的,可以有效防止恶意攻击或错误配置导致的服务宕机。以下是一个详细的实现方案,使用 Nginx 和 Lua 脚本结合 Redis 来实现基于 IP 的访问频率限制…...